UpdateOptions class

UpdateOptions class

Provides options for update operation.

The UpdateOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the UpdateOptions class.

Properties

Property Description
cancellation The operation cancellation object. The default value is None.
is_async The flag indicating whether the operation should be performed asynchronously. The default value is False.
separate_process_options The options for extracting data in a separate process.
threads The number of threads used for indexing.
auto_detect_encoding The auto_detect_encoding flag indicates whether to detect encoding automatically. The default value is False. (inherited from BaseOptions)
encoding The encoding used to extract text from text documents. The default is None, which means UTF-8 is used. If AutoDetectEncoding is True, this value serves as the default encoding. (inherited from BaseOptions)
image_indexing_options The image indexing options for reverse image search. (inherited from BaseOptions)
metadata_indexing_options The options for indexing metadata fields. (inherited from BaseOptions)
ocr_indexing_options The options for OCR processing and indexing recognized text. (inherited from BaseOptions)
use_backup_privilege The property indicates whether the process should use the SeBackupPrivilege and FILE_FLAG_BACKUP_SEMANTICS to access files and directories. The default value is False. True enables privileged access using SeBackupPrivilege and FILE_FLAG_BACKUP_SEMANTICS; otherwise, False. (inherited from BaseOptions)
use_raw_text_extraction The property indicates whether raw text extraction mode is used if possible. The default is False; raw mode can significantly increase indexing speed, while normal mode improves formatting of extracted text. (inherited from BaseOptions)

Example

from groupdocs.search import Index
from groupdocs.search.options import UpdateOptions

# Delete indexed paths from the index
result = index.delete([documents_folder1], UpdateOptions())
print(f"Deleted paths: {result.success_count}")

See Also