Package com.hazelcast.config.vector
Class VectorIndexConfig
java.lang.Object
com.hazelcast.config.vector.VectorIndexConfig
- All Implemented Interfaces:
- NamedConfig,- DataSerializable,- IdentifiedDataSerializable
@Beta
public class VectorIndexConfig
extends Object
implements NamedConfig, IdentifiedDataSerializable
Configuration for a vector index.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs an empty VectorIndexConfig.VectorIndexConfig(VectorIndexConfig config) Constructs a newVectorIndexConfiginstance by copying the values from the provided configuration.VectorIndexConfig(String indexName, Metric metric, int dimension) Constructs a VectorIndexConfig with the given parameters.VectorIndexConfig(String indexName, Metric metric, int dimension, int maxDegree, int efConstruction, boolean useDeduplication) Constructs a VectorIndexConfig object with the specified parameters.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanintReturns type identifier for this class.intRetrieves the dimension of this vector index configuration.intRetrieves the size of the dynamic list search to use during index time.intReturns DataSerializableFactory factory ID for this class.intRetrieves the maximum number of connections a node can have.Retrieves the metric of this vector index configuration.getName()Returns the name of this vector indexinthashCode()booleanChecks if deduplication is enabled.voidReads fields from the input streamsetDimension(int dimension) Sets the dimension of this vector index configuration.setEfConstruction(int efConstruction) Sets the size of the dynamic list search to use during index time.setMaxDegree(int maxDegree) Sets the maximum number of connections allowed per node.Sets the metric of this vector index configuration.Sets the name of the vector index.setUseDeduplication(boolean useDeduplication) Enables or disables deduplication.toString()voidWrites object fields to output stream
- 
Constructor Details- 
VectorIndexConfigConstructs a VectorIndexConfig with the given parameters.- Parameters:
- indexName- the name of the index
- metric- the distance metric of the index
- dimension- the dimension of the index
- Throws:
- IllegalArgumentException- if the indexName is invalid.
- NullPointerException- if the metric is null.
 
- 
VectorIndexConfigpublic VectorIndexConfig(String indexName, Metric metric, int dimension, int maxDegree, int efConstruction, boolean useDeduplication) Constructs a VectorIndexConfig object with the specified parameters.- Parameters:
- indexName- The name of the index.
- metric- The metric used for indexing.
- dimension- The dimension of the vectors to be indexed.
- maxDegree- The maximum number of connections allowed per node.
- efConstruction- The size of the dynamic list for search.
- useDeduplication- Whether to enable deduplication in the index.
- Throws:
- IllegalArgumentException- if the indexName is invalid.
- NullPointerException- if the metric is null.
 
- 
VectorIndexConfigpublic VectorIndexConfig()Constructs an empty VectorIndexConfig.
- 
VectorIndexConfigConstructs a newVectorIndexConfiginstance by copying the values from the provided configuration.- Parameters:
- config- The- VectorIndexConfiginstance to copy. It serves as the source of values for the new configuration.
 
 
- 
- 
Method Details- 
getMetricRetrieves the metric of this vector index configuration.- Returns:
- the metric of the index
 
- 
setMetricSets the metric of this vector index configuration.- Parameters:
- metric- the metric to set
- Returns:
- this VectorIndexConfig instance
 
- 
getDimensionpublic int getDimension()Retrieves the dimension of this vector index configuration.- Returns:
- the dimension of the index
 
- 
setDimensionSets the dimension of this vector index configuration.- Parameters:
- dimension- the dimension to set
- Returns:
- this VectorIndexConfig instance
 
- 
getMaxDegreepublic int getMaxDegree()Retrieves the maximum number of connections a node can have.- Returns:
- The maximum number of connections allowed per node.
 
- 
setMaxDegreeSets the maximum number of connections allowed per node.- Parameters:
- maxDegree- The maximum degree to set.
- Returns:
- this VectorIndexConfig instance
 
- 
getEfConstructionpublic int getEfConstruction()Retrieves the size of the dynamic list search to use during index time.- Returns:
- the size of the dynamic list search.
 
- 
setEfConstructionSets the size of the dynamic list search to use during index time.- Parameters:
- efConstruction- the size of the dynamic list search.
- Returns:
- this VectorIndexConfig instance
 
- 
isUseDeduplicationpublic boolean isUseDeduplication()Checks if deduplication is enabled.- Returns:
- True if deduplication is enabled, false otherwise.
 
- 
setUseDeduplicationEnables or disables deduplication.- Parameters:
- useDeduplication- True to enable deduplication, false to disable.
- Returns:
- this VectorIndexConfig instance
 
- 
setNameSets the name of the vector index.- Specified by:
- setNamein interface- NamedConfig
- Parameters:
- name- the name to set for this vector index.
 
- 
getNameReturns the name of this vector index- Specified by:
- getNamein interface- NamedConfig
- Returns:
- the name of the vector index
 
- 
writeDataDescription copied from interface:DataSerializableWrites object fields to output stream- Specified by:
- writeDatain interface- DataSerializable
- Parameters:
- out- output
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
- 
readDataDescription copied from interface:DataSerializableReads fields from the input stream- Specified by:
- readDatain interface- DataSerializable
- Parameters:
- in- input
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the input stream has been closed.
 
- 
getFactoryIdpublic int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
- getFactoryIdin interface- IdentifiedDataSerializable
- Returns:
- factory ID
 
- 
getClassIdpublic int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
- getClassIdin interface- IdentifiedDataSerializable
- Returns:
- type ID
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-