Class TextIndexHandler
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
-
- org.apache.pinot.segment.local.segment.index.loader.invertedindex.TextIndexHandler
-
- All Implemented Interfaces:
IndexHandler
public class TextIndexHandler extends BaseIndexHandler
Helper class for text indexes used bySegmentPreProcessor. to create text index for column during segment load time. Currently text index is always created (if enabled on a column) during segment generation (1) A new segment with text index is created/refreshed. Server loads the segment. The handler detects the existence of text index and returns. (2) A reload is issued on an existing segment with existing text index. The handler detects the existence of text index and returns. (3) A reload is issued on an existing segment after text index is enabled on an existing column. Read the forward index to create text index. (4) A reload is issued on an existing segment after text index is enabled on a newly added column. In this case, the default column handler would have taken care of adding forward index for the new column. Read the forward index to create text index.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexHandler
IndexHandler.NoOp
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
_fieldIndexConfigs, _segmentDirectory, _tableConfig, _tmpForwardIndexColumns
-
-
Constructor Summary
Constructors Constructor Description TextIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, TableConfig tableConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanneedUpdateIndices(SegmentDirectory.Reader segmentReader)voidupdateIndices(SegmentDirectory.Writer segmentWriter)-
Methods inherited from class org.apache.pinot.segment.local.segment.index.loader.BaseIndexHandler
createForwardIndexIfNeeded, postUpdateIndicesCleanup
-
-
-
-
Constructor Detail
-
TextIndexHandler
public TextIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> fieldIndexConfigs, @Nullable TableConfig tableConfig)
-
-
Method Detail
-
needUpdateIndices
public boolean needUpdateIndices(SegmentDirectory.Reader segmentReader)
-
updateIndices
public void updateIndices(SegmentDirectory.Writer segmentWriter) throws Exception
- Throws:
Exception
-
-