SearchOptions class
Leave feedback
On this page
Provides options for search operation.
Learn more
The SearchOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the SearchOptions class. |
| Property | Description |
|---|---|
| cancellation | The operation cancellation object, defaulting to None. |
| date_formats | The collection of date formats for date range search. The default date formats are 'dd.MM.yyyy', 'MM/dd/yyyy', and 'yyyy-MM-dd'. |
| fuzzy_search | The fuzzy search options. |
| is_chunk_search | The flag of search by chunks. The default value is False. |
| keyboard_layout_corrector | The keyboard layout corrector options. |
| max_occurrence_count_per_term | The maximum number of occurrences of each term in a search query (default is 2000000000). |
| max_total_occurrence_count | The maximum total number of occurrences of all terms in a search query (default is 2000000000). |
| retrieve_attributes | The flag of retrieving attributes associated with found documents. |
| search_document_filter | The search document filter. The default value is None, which means that all found documents will be returned. |
| spelling_corrector | The spelling corrector options. |
| use_case_sensitive_search | The flag indicating whether the search is case‑sensitive. The default value is False. |
| use_homophone_search | The flag indicating whether homophones are used in search (default: False). |
| use_synonym_search | The flag of use synonyms in search; default is False. |
| use_word_forms_search | The flag indicating whether to use different word forms in search. |
from groupdocs.search import Index
from groupdocs.search.options import SearchOptions
with Index("./index") as index:
index.add("./documents")
options = SearchOptions()
options.fuzzy_search.enabled = True # Enable fuzzy search
result = index.search("Einstein", options)
print("Documents found:", result.document_count)
Task guides that use SearchOptions:
- module
groupdocs.search.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.