EventHub class
Leave feedback
On this page
Provides index events for subscribing.
Learn more:
- Search index events: https://docs.groupdocs.com/search/python-net/search-index-events/
The EventHub type exposes the following members:
| Event | Description |
|---|---|
| error_occurred | Occurs when an error occurs during an index operation. |
| file_indexing | Occurs when a document is going to be indexed. |
| image_preparing | Occurs when an image is going to be prepared for indexing. |
| operation_finished | Occurs when an index operation is finished. |
| operation_progress_changed | Occurs when the progress of the indexing or update operation changes. |
| optimization_progress_changed | Occurs when the progress of the optimization operation changes. |
| password_required | Occurs when a document requires password for opening. |
| search_phase_completed | Occurs when the search phase is completed. |
| status_changed | Occurs when the index status changes. |
from groupdocs.search import Index
index_folder = "./MyIndex"
documents_folder = "./documents"
query = "Einstein"
index = Index(index_folder)
def on_error(sender, args):
print(args.message)
index.events.error_occurred += on_error
index.add(documents_folder)
result = index.search(query)
- module
groupdocs.search.events
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.