google-cloud-firestore-v1 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3682a4ecf6e2a93dcc0506aad070fd1ff095c0d5dd7f1bb3e9be5ab6726ebbd4
|
4
|
+
data.tar.gz: c2484fb566bb68b7ca9e4bcf2fbd6987fe634052d36cf30253d2d578d8743c2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb6781edf31f723a9d2dc5e54c94b1c35525e509909ff05ba0d61e68ae50c9658cc4b7c320104b39fee59d51e6a4aedc117c8027b416a84aad60318d40c02f0
|
7
|
+
data.tar.gz: 043460b687203d8c0c3737eb0a200818b82bc0ccdb519f9506222f2e09fc20edd1f76e0ed7319ffc3f31d01e137041e21a02635d1e1f38b33a896fb10a1bce41
|
@@ -9,7 +9,7 @@ require 'google/firestore/v1/document_pb'
|
|
9
9
|
require 'google/protobuf/wrappers_pb'
|
10
10
|
|
11
11
|
|
12
|
-
descriptor_data = "\n\x1fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/firestore/v1/document.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\
|
12
|
+
descriptor_data = "\n\x1fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\"google/firestore/v1/document.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x95\x13\n\x0fStructuredQuery\x12?\n\x06select\x18\x01 \x01(\x0b\x32/.google.firestore.v1.StructuredQuery.Projection\x12\x45\n\x04\x66rom\x18\x02 \x03(\x0b\x32\x37.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\n\x05where\x18\x03 \x01(\x0b\x32+.google.firestore.v1.StructuredQuery.Filter\x12<\n\x08order_by\x18\x04 \x03(\x0b\x32*.google.firestore.v1.StructuredQuery.Order\x12-\n\x08start_at\x18\x07 \x01(\x0b\x32\x1b.google.firestore.v1.Cursor\x12+\n\x06\x65nd_at\x18\x08 \x01(\x0b\x32\x1b.google.firestore.v1.Cursor\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12*\n\x05limit\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12K\n\x0c\x66ind_nearest\x18\t \x01(\x0b\x32\x30.google.firestore.v1.StructuredQuery.FindNearestB\x03\xe0\x41\x01\x1a\x44\n\x12\x43ollectionSelector\x12\x15\n\rcollection_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61ll_descendants\x18\x03 \x01(\x08\x1a\xfd\x01\n\x06\x46ilter\x12P\n\x10\x63omposite_filter\x18\x01 \x01(\x0b\x32\x34.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\n\x0c\x66ield_filter\x18\x02 \x01(\x0b\x32\x30.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\n\x0cunary_filter\x18\x03 \x01(\x0b\x32\x30.google.firestore.v1.StructuredQuery.UnaryFilterH\x00\x42\r\n\x0b\x66ilter_type\x1a\xd1\x01\n\x0f\x43ompositeFilter\x12I\n\x02op\x18\x01 \x01(\x0e\x32=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\n\x07\x66ilters\x18\x02 \x03(\x0b\x32+.google.firestore.v1.StructuredQuery.Filter\"5\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\x12\x06\n\x02OR\x10\x02\x1a\x98\x03\n\x0b\x46ieldFilter\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x12\x45\n\x02op\x18\x02 \x01(\x0e\x32\x39.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\n\x05value\x18\x03 \x01(\x0b\x32\x1a.google.firestore.v1.Value\"\xd2\x01\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x12\x12\n\x0e\x41RRAY_CONTAINS\x10\x07\x12\x06\n\x02IN\x10\x08\x12\x16\n\x12\x41RRAY_CONTAINS_ANY\x10\t\x12\n\n\x06NOT_IN\x10\n\x1a\x8a\x02\n\x0bUnaryFilter\x12\x45\n\x02op\x18\x01 \x01(\x0e\x32\x39.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12\x44\n\x05\x66ield\x18\x02 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\n\n\x06IS_NAN\x10\x02\x12\x0b\n\x07IS_NULL\x10\x03\x12\x0e\n\nIS_NOT_NAN\x10\x04\x12\x0f\n\x0bIS_NOT_NULL\x10\x05\x42\x0e\n\x0coperand_type\x1a\x8e\x01\n\x05Order\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x12\x41\n\tdirection\x18\x02 \x01(\x0e\x32..google.firestore.v1.StructuredQuery.Direction\x1a$\n\x0e\x46ieldReference\x12\x12\n\nfield_path\x18\x02 \x01(\t\x1aQ\n\nProjection\x12\x43\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x1a\x87\x03\n\x0b\x46indNearest\x12N\n\x0cvector_field\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReferenceB\x03\xe0\x41\x02\x12\x35\n\x0cquery_vector\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.ValueB\x03\xe0\x41\x02\x12_\n\x10\x64istance_measure\x18\x03 \x01(\x0e\x32@.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasureB\x03\xe0\x41\x02\x12/\n\x05limit\x18\x04 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x02\"_\n\x0f\x44istanceMeasure\x12 \n\x1c\x44ISTANCE_MEASURE_UNSPECIFIED\x10\x00\x12\r\n\tEUCLIDEAN\x10\x01\x12\n\n\x06\x43OSINE\x10\x02\x12\x0f\n\x0b\x44OT_PRODUCT\x10\x03\"E\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"\xb8\x05\n\x1aStructuredAggregationQuery\x12@\n\x10structured_query\x18\x01 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12V\n\x0c\x61ggregations\x18\x03 \x03(\x0b\x32;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x03\xe0\x41\x01\x1a\xf1\x03\n\x0b\x41ggregation\x12R\n\x05\x63ount\x18\x01 \x01(\x0b\x32\x41.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\n\x03sum\x18\x02 \x01(\x0b\x32?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\n\x03\x61vg\x18\x03 \x01(\x0b\x32?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x12\n\x05\x61lias\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x05\x43ount\x12/\n\x05up_to\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\x1aI\n\x03Sum\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReference\x1aI\n\x03\x41vg\x12\x42\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x33.google.firestore.v1.StructuredQuery.FieldReferenceB\n\n\x08operatorB\x0c\n\nquery_type\"D\n\x06\x43ursor\x12*\n\x06values\x18\x01 \x03(\x0b\x32\x1a.google.firestore.v1.Value\x12\x0e\n\x06\x62\x65\x66ore\x18\x02 \x01(\x08\x42\xc2\x01\n\x17\x63om.google.firestore.v1B\nQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3"
|
13
13
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
15
|
|
@@ -53,6 +53,8 @@ module Google
|
|
53
53
|
StructuredQuery::Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Order").msgclass
|
54
54
|
StructuredQuery::FieldReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FieldReference").msgclass
|
55
55
|
StructuredQuery::Projection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Projection").msgclass
|
56
|
+
StructuredQuery::FindNearest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FindNearest").msgclass
|
57
|
+
StructuredQuery::FindNearest::DistanceMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure").enummodule
|
56
58
|
StructuredQuery::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredQuery.Direction").enummodule
|
57
59
|
StructuredAggregationQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery").msgclass
|
58
60
|
StructuredAggregationQuery::Aggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.StructuredAggregationQuery.Aggregation").msgclass
|
@@ -128,6 +128,13 @@ module Google
|
|
128
128
|
# Requires:
|
129
129
|
#
|
130
130
|
# * The value must be greater than or equal to zero if specified.
|
131
|
+
# @!attribute [rw] find_nearest
|
132
|
+
# @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest]
|
133
|
+
# Optional. A potential Nearest Neighbors Search.
|
134
|
+
#
|
135
|
+
# Applies after all other filters and ordering.
|
136
|
+
#
|
137
|
+
# Finds the closest vector embeddings to the given query vector.
|
131
138
|
class StructuredQuery
|
132
139
|
include ::Google::Protobuf::MessageExts
|
133
140
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -362,6 +369,52 @@ module Google
|
|
362
369
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
363
370
|
end
|
364
371
|
|
372
|
+
# Nearest Neighbors search config.
|
373
|
+
# @!attribute [rw] vector_field
|
374
|
+
# @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference]
|
375
|
+
# Required. An indexed vector field to search upon. Only documents which
|
376
|
+
# contain vectors whose dimensionality match the query_vector can be
|
377
|
+
# returned.
|
378
|
+
# @!attribute [rw] query_vector
|
379
|
+
# @return [::Google::Cloud::Firestore::V1::Value]
|
380
|
+
# Required. The query vector that we are searching on. Must be a vector of
|
381
|
+
# no more than 2048 dimensions.
|
382
|
+
# @!attribute [rw] distance_measure
|
383
|
+
# @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure]
|
384
|
+
# Required. The Distance Measure to use, required.
|
385
|
+
# @!attribute [rw] limit
|
386
|
+
# @return [::Google::Protobuf::Int32Value]
|
387
|
+
# Required. The number of nearest neighbors to return. Must be a positive
|
388
|
+
# integer of no more than 1000.
|
389
|
+
class FindNearest
|
390
|
+
include ::Google::Protobuf::MessageExts
|
391
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
392
|
+
|
393
|
+
# The distance measure to use when comparing vectors.
|
394
|
+
module DistanceMeasure
|
395
|
+
# Should not be set.
|
396
|
+
DISTANCE_MEASURE_UNSPECIFIED = 0
|
397
|
+
|
398
|
+
# Measures the EUCLIDEAN distance between the vectors. See
|
399
|
+
# [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
|
400
|
+
# more
|
401
|
+
EUCLIDEAN = 1
|
402
|
+
|
403
|
+
# Compares vectors based on the angle between them, which allows you to
|
404
|
+
# measure similarity that isn't based on the vectors magnitude.
|
405
|
+
# We recommend using DOT_PRODUCT with unit normalized vectors instead of
|
406
|
+
# COSINE distance, which is mathematically equivalent with better
|
407
|
+
# performance. See [Cosine
|
408
|
+
# Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn
|
409
|
+
# more.
|
410
|
+
COSINE = 2
|
411
|
+
|
412
|
+
# Similar to cosine but is affected by the magnitude of the vectors. See
|
413
|
+
# [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more.
|
414
|
+
DOT_PRODUCT = 3
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
365
418
|
# A sort direction.
|
366
419
|
module Direction
|
367
420
|
# Unspecified.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|