Class VectorIndex (0.3.0)
Stay organized with collections
Save and categorize content based on your preferences.
VectorIndex(
name: typing.Optional[str] = None,
index_type: typing.Optional[
langchain_google_cloud_sql_mysql.indexes.IndexType
] = None,
distance_measure: typing.Optional[
langchain_google_cloud_sql_mysql.indexes.DistanceMeasure
] = None,
num_partitions: typing.Optional[int] = None,
num_neighbors: typing.Optional[int] = None,
)
Represents a vector index for storing and querying vectors.
Attributes |
Name |
Description |
name
:noindex: |
Optional[str]
The name of the index.
|
index_type
:noindex: |
Optional[IndexType]
The type of index.
|
distance_measure
:noindex: |
Optional[DistanceMeasure]
The distance measure to use for the index.
|
num_partitions
:noindex: |
Optional[int]
The number of partitions for the index. None for default.
|
num_neighbors
:noindex: |
Optional[int]
The default number of neighbors to return for queries.
|
Methods
VectorIndex
VectorIndex(
name: typing.Optional[str] = None,
index_type: typing.Optional[
langchain_google_cloud_sql_mysql.indexes.IndexType
] = None,
distance_measure: typing.Optional[
langchain_google_cloud_sql_mysql.indexes.DistanceMeasure
] = None,
num_partitions: typing.Optional[int] = None,
num_neighbors: typing.Optional[int] = None,
)
Initializes a new instance of the VectorIndex class.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Class VectorIndex (0.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.3.0 (latest)](/python/docs/reference/langchain-google-cloud-sql-mysql/latest/langchain_google_cloud_sql_mysql.indexes.VectorIndex)\n- [0.2.3](/python/docs/reference/langchain-google-cloud-sql-mysql/0.2.3/langchain_google_cloud_sql_mysql.indexes.VectorIndex) \n\n VectorIndex(\n name: typing.Optional[str] = None,\n index_type: typing.Optional[\n langchain_google_cloud_sql_mysql.indexes.IndexType\n ] = None,\n distance_measure: typing.Optional[\n langchain_google_cloud_sql_mysql.indexes.DistanceMeasure\n ] = None,\n num_partitions: typing.Optional[int] = None,\n num_neighbors: typing.Optional[int] = None,\n )\n\nRepresents a vector index for storing and querying vectors.\n\nMethods\n-------\n\n### VectorIndex\n\n VectorIndex(\n name: typing.Optional[str] = None,\n index_type: typing.Optional[\n langchain_google_cloud_sql_mysql.indexes.IndexType\n ] = None,\n distance_measure: typing.Optional[\n langchain_google_cloud_sql_mysql.indexes.DistanceMeasure\n ] = None,\n num_partitions: typing.Optional[int] = None,\n num_neighbors: typing.Optional[int] = None,\n )\n\nInitializes a new instance of the VectorIndex class."]]