Enum VectorQuery.DistanceMeasure (3.30.0)

public enum VectorQuery.DistanceMeasure extends Enum<VectorQuery.DistanceMeasure>

The distance measure to use when comparing vectors in a VectorQuery. See Also: com.google.cloud.firestore.Query#findNearest

Static Fields

Name Description
COSINE

COSINE distance compares vectors based on the angle between them, which allows you to measure similarity that isn't based on the vectors' magnitude. We recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE distance, which is mathematically equivalent with better performance.

DOT_PRODUCT

Similar to cosine but is affected by the magnitude of the vectors.

EUCLIDEAN

Measures the EUCLIDEAN distance between the vectors.

Static Methods

Name Description
valueOf(String name)
values()