VectorIndexConfig(
name: str,
field_name: str,
type: str,
distance_strategy: langchain_community.vectorstores.utils.DistanceStrategy,
vector_size: int,
data_type: str = "FLOAT32",
)
Initializes the VectorIndexConfig object.
Parameters | |
---|---|
Name | Description |
name |
str
The unique name for the vector index. This name is used to identify and reference the index within the vector storage system. |
field_name |
str
The name of the field in the data structure that contains the vector data to be indexed. This specifies the target data for indexing. |
type |
str
The type of vector index. This parameter determines the indexing algorithm or structure to be used (e.g., "FLAT", "HNSW"). |
distance_strategy |
DistanceStrategy
Enum specifying the metric used to calculate the distance or similarity between vectors. Supported strategies include COSINE, EUCLIDEAN_DISTANCE (L2), and MAX_INNER_PRODUCT (IP), influencing how search results are ranked and returned. |
vector_size |
int
The dimensionality of the vectors that will be stored and indexed. All vectors must conform to this specified size. |
data_type |
str, optional
The data type of the vector elements (e.g., "FLOAT32"). This specifies the precision and format of the vector data, affecting storage requirements and possibly search performance. |