Class QueryParameters (0.4.1)

QueryParameters(
    algorithm=NearestNeighborsAlgorithm.EXACT_NEAREST_NEIGHBOR,
    distance_strategy=DistanceStrategy.EUCLIDEIAN,
    read_timestamp: typing.Optional[datetime.datetime] = None,
    min_read_timestamp: typing.Optional[datetime.datetime] = None,
    max_staleness: typing.Optional[datetime.timedelta] = None,
    exact_staleness: typing.Optional[datetime.timedelta] = None,
)

Class representing query parameters for nearest neighbors search.

Classes

NearestNeighborsAlgorithm

NearestNeighborsAlgorithm(value)

Enum for nearest neighbors search algorithms.

Methods

QueryParameters

QueryParameters(
    algorithm=NearestNeighborsAlgorithm.EXACT_NEAREST_NEIGHBOR,
    distance_strategy=DistanceStrategy.EUCLIDEIAN,
    read_timestamp: typing.Optional[datetime.datetime] = None,
    min_read_timestamp: typing.Optional[datetime.datetime] = None,
    max_staleness: typing.Optional[datetime.timedelta] = None,
    exact_staleness: typing.Optional[datetime.timedelta] = None,
)

Initialize query parameters.

Parameters:

  • algorithm (NearestNeighborsAlgorithm): The nearest neighbors search algorithm. Defaults to NearestNeighborsAlgorithm.BRUTE_FORCE.
  • distance_strategy (DistanceStrategy): The distance calculation strategy. Defaults to DistanceStrategy.EUCLIDEAN.
  • staleness (int): The staleness value. Defaults to 0.