Class VectorIndexType
- java.lang.Object
-
- org.apache.pinot.segment.spi.index.AbstractIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
- org.apache.pinot.segment.local.segment.index.vector.VectorIndexType
-
- All Implemented Interfaces:
ConfigurableFromIndexLoadingConfig<VectorIndexConfig>,IndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
public class VectorIndexType extends AbstractIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator> implements ConfigurableFromIndexLoadingConfig<VectorIndexConfig>
Index type for vector columns. Currently only supports for float array columns and the supported vector index type is: HNSW.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVectorIndexType.IndexType-
Nested classes/interfaces inherited from interface org.apache.pinot.segment.spi.index.IndexType
IndexType.BuildLifecycle
-
-
Field Summary
Fields Modifier and Type Field Description static StringINDEX_DISPLAY_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedVectorIndexType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnConfigDeserializer<VectorIndexConfig>createDeserializer()VectorIndexCreatorcreateIndexCreator(IndexCreationContext context, VectorIndexConfig indexConfig)IndexHandlercreateIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> configsByCol, Schema schema, TableConfig tableConfig)MutableIndexcreateMutableIndex(MutableIndexContext context, VectorIndexConfig config)protected IndexReaderFactory<VectorIndexReader>createReaderFactory()Map<String,VectorIndexConfig>fromIndexLoadingConfig(IndexLoadingConfig indexLoadingConfig)Returns a map that can be used to get the index config.VectorIndexConfiggetDefaultConfig()List<String>getFileExtensions(ColumnMetadata columnMetadata)Class<VectorIndexConfig>getIndexConfigClass()StringgetPrettyName()-
Methods inherited from class org.apache.pinot.segment.spi.index.AbstractIndexType
convertToNewFormat, equals, getConfig, getId, getReaderFactory, handleIndexSpecificCleanup, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.IndexType
getIndexBuildLifecycle, getIndexReader
-
-
-
-
Field Detail
-
INDEX_DISPLAY_NAME
public static final String INDEX_DISPLAY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndexConfigClass
public Class<VectorIndexConfig> getIndexConfigClass()
- Specified by:
getIndexConfigClassin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
fromIndexLoadingConfig
public Map<String,VectorIndexConfig> fromIndexLoadingConfig(IndexLoadingConfig indexLoadingConfig)
Description copied from interface:ConfigurableFromIndexLoadingConfigReturns a map that can be used to get the index config. This map is used with higher priority whenever the index configuration needs to be read from anIndexLoadingConfig. SometimesIndexLoadingConfigis not completely configured andIndexLoadingConfig.getAllKnownColumns()does not return all columns in the table. Therefore the returned map may not have an entry for each column in the actual schema.- Specified by:
fromIndexLoadingConfigin interfaceConfigurableFromIndexLoadingConfig<VectorIndexConfig>- Returns:
- a map whose keys are the column names and the values are the index configuration for that column.
-
getDefaultConfig
public VectorIndexConfig getDefaultConfig()
- Specified by:
getDefaultConfigin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
getPrettyName
public String getPrettyName()
- Specified by:
getPrettyNamein interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
createDeserializer
public ColumnConfigDeserializer<VectorIndexConfig> createDeserializer()
- Specified by:
createDeserializerin classAbstractIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
createIndexCreator
public VectorIndexCreator createIndexCreator(IndexCreationContext context, VectorIndexConfig indexConfig) throws IOException
- Specified by:
createIndexCreatorin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>- Throws:
IOException
-
createReaderFactory
protected IndexReaderFactory<VectorIndexReader> createReaderFactory()
- Specified by:
createReaderFactoryin classAbstractIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
createIndexHandler
public IndexHandler createIndexHandler(SegmentDirectory segmentDirectory, Map<String,FieldIndexConfigs> configsByCol, @Nullable Schema schema, @Nullable TableConfig tableConfig)
- Specified by:
createIndexHandlerin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
getFileExtensions
public List<String> getFileExtensions(@Nullable ColumnMetadata columnMetadata)
- Specified by:
getFileExtensionsin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
createMutableIndex
@Nullable public MutableIndex createMutableIndex(MutableIndexContext context, VectorIndexConfig config)
- Specified by:
createMutableIndexin interfaceIndexType<VectorIndexConfig,VectorIndexReader,VectorIndexCreator>
-
-