Optional
collection?: stringThe name of the collection from which to query.
The name of the field containing the document content you wish to return.
Optional
distanceMeasure?: "EUCLIDEAN" | "COSINE" | "DOT_PRODUCT"The distance measure to use when comparing vectors. Defaults to 'COSINE'.
Optional
distanceResultField?: stringOptionally specifies the name of a metadata field that will be set on each returned Document, which will contain the computed distance for the document.
Optional
distanceThreshold?: numberSpecifies a threshold for which no less similar documents will be returned. The behavior
of the specified distanceMeasure
will affect the meaning of the distance threshold.
distanceMeasure: "EUCLIDEAN"
, the meaning of distanceThreshold
is:
SELECT docs WHERE euclidean_distance <= distanceThresholddistanceMeasure: "COSINE"
, the meaning of distanceThreshold
is:
SELECT docs WHERE cosine_distance <= distanceThresholddistanceMeasure: "DOT_PRODUCT"
, the meaning of distanceThreshold
is:
SELECT docs WHERE dot_product_distance >= distanceThresholdThe embedder to use with this retriever.
The Firestore database instance from which to query.
Optional
label?: stringOptional label for display in Developer UI.
Optional
metadataFields?: A list of fields to include in the returned document metadata. If not supplied, all fields other than the vector are included. Alternatively, provide a transform function to extract the desired metadata fields from a snapshot.
The name of the retriever.
The name of the field within the collection containing the vector data.
Define a retriever that uses vector similarity search to retrieve documents from Firestore. You must create a vector index on the associated field before you can perform nearest-neighbor search.