Module indexes (0.4.0)

API documentation for indexes module.

Classes

BaseIndex

BaseIndex(name: str = 'langchainvectorindex', index_type: str = 'base', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None)

BaseIndex(name: str = 'langchainvectorindex', index_type: str = 'base', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

DistanceStrategy

DistanceStrategy(value)

Enumerator of the Distance strategies.

ExactNearestNeighbor

ExactNearestNeighbor(name: str = 'langchainvectorindex', index_type: str = 'exactnearestneighbor', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None)

ExactNearestNeighbor(name: str = 'langchainvectorindex', index_type: str = 'exactnearestneighbor', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

HNSWIndex

HNSWIndex(name: str = 'langchainvectorindex', index_type: str = 'hnsw', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None, m: int = 16, ef_construction: int = 64)

HNSWIndex(name: str = 'langchainvectorindex', index_type: str = 'hnsw', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

HNSWQueryOptions

HNSWQueryOptions(ef_search: int = 40)

HNSWQueryOptions(ef_search: int = 40)

IVFFlatIndex

IVFFlatIndex(name: str = 'langchainvectorindex', index_type: str = 'ivfflat', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None, lists: int = 1)

IVFFlatIndex(name: str = 'langchainvectorindex', index_type: str = 'ivfflat', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

IVFFlatQueryOptions

IVFFlatQueryOptions(probes: int = 1)

IVFFlatQueryOptions(probes: int = 1)

IVFIndex

IVFIndex(name: str = 'langchainvectorindex', index_type: str = 'ivf', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None, lists: int = 100)

IVFIndex(name: str = 'langchainvectorindex', index_type: str = 'ivf', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

IVFQueryOptions

IVFQueryOptions(probes: int = 1)

IVFQueryOptions(probes: int = 1)

QueryOptions

QueryOptions()

QueryOptions()

ScaNNIndex

ScaNNIndex(name: str = 'langchainvectorindex', index_type: str = 'ScaNN', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[List[str]] = None, num_leaves: int = 5)

ScaNNIndex(name: str = 'langchainvectorindex', index_type: str = 'ScaNN', distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy =

StrategyMixin

StrategyMixin(
    operator: str, search_function: str, index_function: str, scann_index_function: str
)

StrategyMixin(operator: str, search_function: str, index_function: str, scann_index_function: str)