File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,22 @@ message StructuredQuery {
312312 // integer of no more than 1000.
313313 google.protobuf.Int32Value limit = 4
314314 [(google.api.field_behavior ) = REQUIRED ];
315+
316+ // Optional. Optional name of the field to output the result of the vector
317+ // distance calculation. Must conform to [document field
318+ // name][google.firestore.v1.Document.fields] limitations.
319+ string distance_result_field = 5 [(google.api.field_behavior ) = OPTIONAL ];
320+
321+ // Optional. Option to specify a threshold for which no less similar
322+ // documents will be returned. The behavior of the specified
323+ // `distance_measure` will affect the meaning of the distance threshold.
324+ // Since DOT_PRODUCT distances increase when the vectors are more similar,
325+ // the comparison is inverted.
326+ //
327+ // For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold
328+ // For DOT_PRODUCT: WHERE distance >= distance_threshold
329+ google.protobuf.DoubleValue distance_threshold = 6
330+ [(google.api.field_behavior ) = OPTIONAL ];
315331 }
316332
317333 // Optional sub-set of the fields to return.
You can’t perform that action at this time.
0 commit comments