Interface IndexHandler
-
- All Known Implementing Classes:
BaseIndexHandler,BloomFilterHandler,ForwardIndexHandler,FSTIndexHandler,H3IndexHandler,InvertedIndexHandler,JsonIndexHandler,RangeIndexHandler,TextIndexHandler
public interface IndexHandlerInterface for index handlers, which update the corresponding type of indices, like adding, removing or converting the format.
-
-
Method Summary
Modifier and Type Method Description booleanneedUpdateIndices(SegmentDirectory.Reader segmentReader)Check if there is a need to add new indices or removes obsolete indices.voidpostUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter)Performs any cleanup actions required after the indexes have been updated.voidupdateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider)Adds new indices and removes obsolete indices.
-
-
-
Method Detail
-
updateIndices
void updateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorProvider indexCreatorProvider) throws Exception
Adds new indices and removes obsolete indices.- Throws:
Exception
-
needUpdateIndices
boolean needUpdateIndices(SegmentDirectory.Reader segmentReader) throws Exception
Check if there is a need to add new indices or removes obsolete indices.- Returns:
- true if there is a need to update.
- Throws:
Exception
-
postUpdateIndicesCleanup
void postUpdateIndicesCleanup(SegmentDirectory.Writer segmentWriter) throws Exception
Performs any cleanup actions required after the indexes have been updated. Should be called only after all IndexHandlers have run.- Throws:
Exception
-
-