Skip to content

Commit edbfc72

Browse files
1 parent 40d606a commit edbfc72

File tree

215 files changed

+24
-74912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+24
-74912
lines changed

β€Žgoogle/cloud/firestore_v1/types/query.pyβ€Ž

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,21 @@ class FindNearest(proto.Message):
541541
Required. The number of nearest neighbors to
542542
return. Must be a positive integer of no more
543543
than 1000.
544+
distance_result_field (str):
545+
Optional. Optional name of the field to output the result of
546+
the vector distance calculation. Must conform to [document
547+
field name][google.firestore.v1.Document.fields]
548+
limitations.
549+
distance_threshold (google.protobuf.wrappers_pb2.DoubleValue):
550+
Optional. Option to specify a threshold for which no less
551+
similar documents will be returned. The behavior of the
552+
specified ``distance_measure`` will affect the meaning of
553+
the distance threshold. Since DOT_PRODUCT distances increase
554+
when the vectors are more similar, the comparison is
555+
inverted.
556+
557+
For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold
558+
For DOT_PRODUCT: WHERE distance >= distance_threshold
544559
"""
545560

546561
class DistanceMeasure(proto.Enum):
@@ -597,6 +612,15 @@ class DistanceMeasure(proto.Enum):
597612
number=4,
598613
message=wrappers_pb2.Int32Value,
599614
)
615+
distance_result_field: str = proto.Field(
616+
proto.STRING,
617+
number=5,
618+
)
619+
distance_threshold: wrappers_pb2.DoubleValue = proto.Field(
620+
proto.MESSAGE,
621+
number=6,
622+
message=wrappers_pb2.DoubleValue,
623+
)
600624

601625
select: Projection = proto.Field(
602626
proto.MESSAGE,

β€Žowl-bot-staging/firestore/v1/.coveragercβ€Ž

Lines changed: 0 additions & 13 deletions
This file was deleted.

β€Žowl-bot-staging/firestore/v1/.flake8β€Ž

Lines changed: 0 additions & 33 deletions
This file was deleted.

β€Žowl-bot-staging/firestore/v1/MANIFEST.inβ€Ž

Lines changed: 0 additions & 2 deletions
This file was deleted.

β€Žowl-bot-staging/firestore/v1/README.rstβ€Ž

Lines changed: 0 additions & 49 deletions
This file was deleted.

β€Žowl-bot-staging/firestore/v1/docs/_static/custom.cssβ€Ž

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
Β (0)