Module indexes (0.14.0)

API documentation for indexes module.

Classes

IVFIndex

IVFIndex(name: Optional[str] = None, index_type: str = 'ivf', distance_strategy: langchain_postgres.v2.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[list[str]] = None, extension_name: Optional[str] = None, lists: int = 100)

IVFIndex(name: Optional[str] = None, index_type: str = 'ivf', distance_strategy: langchain_postgres.v2.indexes.DistanceStrategy =

IVFQueryOptions

IVFQueryOptions(probes: int = 1)

IVFQueryOptions(probes: int = 1)

ScaNNIndex

ScaNNIndex(name: Optional[str] = None, index_type: str = 'ScaNN', distance_strategy: langchain_postgres.v2.indexes.DistanceStrategy = <factory>, partial_indexes: Optional[list[str]] = None, extension_name: str = 'alloydb_scann', num_leaves: int = 5)

ScaNNIndex(name: Optional[str] = None, index_type: str = 'ScaNN', distance_strategy: langchain_postgres.v2.indexes.DistanceStrategy =

ScaNNQueryOptions

ScaNNQueryOptions(
    num_leaves_to_search: int = 1, pre_reordering_num_neighbors: int = -1
)

ScaNNQueryOptions(num_leaves_to_search: int = 1, pre_reordering_num_neighbors: int = -1)