fromgroupdocs.searchimportIndexRepositoryindex_folder="./MyIndex"documents_folder="./documents"repository=IndexRepository()index=repository.create(index_folder)# Creating indexindex.add(documents_folder)# Indexing documents# Delete, modify, or add documents in the folder as neededrepository.update()
update
Updates all indexes in the repository.
defupdate(self,options):...
Parameter
Type
Description
options
UpdateOptions
The update options.
Example
fromgroupdocs.searchimportIndexRepositoryfromgroupdocs.search.optionsimportUpdateOptions# Create repository and indexrepository=IndexRepository()index=repository.create("./MyIndex")index.add("./documents")# Modify documents in the folder as needed, then update the indexoptions=UpdateOptions()options.threads=2# Number of indexing threadsrepository.update(options)
Aliases
These names call update too, limited to the overloads listed.