Minimizes the number of index segments by merging them, improving search performance.
Optimization merges the index segments of each shard, reducing their count and physically removing data of deleted documents. This is especially useful after many indexing operations that add new segments.
defoptimize(self,options):...
Parameter
Type
Description
options
OptimizeOptions
The optimize options (OptimizeOptions).
Example
fromgroupdocs.search.optionsimportOptimizeOptions# `node` is the master node of a configured and started search networkindexer=node.indexer# Merge the index segments of each shardindexer.optimize(OptimizeOptions())
Aliases
These names call optimize too, limited to the overloads listed.