IndexRepository class
Leave feedback
On this page
Represents a container for combining multiple indexes and performing common operations on them.
- Search index repository (https://docs.groupdocs.com/search/python-net/search-index-repository/)
The IndexRepository type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the IndexRepository class. |
| Method | Description |
|---|---|
| add_to_repository | Adds an index to the index repository. |
| add_to_repository | Opens and adds an index to the index repository. |
| create | Creates a new index in memory. |
| create | Creates a new index in memory. |
| create | Creates a new index on disk, cleaning the index folder before creation. |
| create | Creates a new index on disk. The index folder will be cleaned before the index creation. |
| dispose | Releases all resources used by the IndexRepository. |
| search | Searches in all indexes of the repository. |
| search | Searches in all indexes of the repository. |
| search | Searches in all indexes of the repository. |
| search | Searches in all indexes of the repository. |
| update | Updates all indexes in the repository. |
| update | Updates all indexes in the repository. |
| Property | Description |
|---|---|
| events | The event hub for subscribing to events. |
| indexes | The indexes contained in this IndexRepository. |
from groupdocs.search import IndexRepository
index_folder1 = "./MyIndex"
index_folder2 = "./MyIndex"
query = "Einstein"
repo = IndexRepository()
repo.add_to_repository(index_folder1) # Load an existing index
repo.add_to_repository(index_folder2) # Load another existing index
result = repo.search(query) # Search across all indexes in the repository
- module
groupdocs.search
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.