couchbase 3.8.0-aarch64-linux → 3.8.2-aarch64-linux
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 +4 -4
- data/README.md +2 -2
- data/lib/couchbase/3.2/libcouchbase.so +0 -0
- data/lib/couchbase/3.3/libcouchbase.so +0 -0
- data/lib/couchbase/3.4/libcouchbase.so +0 -0
- data/lib/couchbase/4.0/libcouchbase.so +0 -0
- data/lib/couchbase/cluster.rb +16 -14
- data/lib/couchbase/datastructures/couchbase_list.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_map.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_queue.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_set.rb +1 -0
- data/lib/couchbase/errors.rb +1 -1
- data/lib/couchbase/json_transcoder.rb +1 -1
- data/lib/couchbase/options.rb +9 -4
- data/lib/couchbase/protostellar/client.rb +0 -2
- data/lib/couchbase/protostellar/cluster.rb +4 -0
- data/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb +54 -0
- data/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb +51 -0
- data/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb +16 -0
- data/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb +16 -0
- data/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb +18 -0
- data/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb +23 -0
- data/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb +4 -25
- data/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb +10 -0
- data/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb +6 -25
- data/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb +18 -0
- data/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb +46 -0
- data/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb +56 -0
- data/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb +3 -26
- data/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb +47 -0
- data/lib/couchbase/protostellar/generated/query/v1/query_pb.rb +4 -26
- data/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb +10 -0
- data/lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb +26 -0
- data/lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb +43 -0
- data/lib/couchbase/protostellar/generated/search/v1/search_pb.rb +5 -26
- data/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb +11 -0
- data/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb +30 -0
- data/lib/couchbase/protostellar/generated/view/v1/view_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb +9 -0
- data/lib/couchbase/protostellar/request_generator/admin/collection.rb +4 -2
- data/lib/couchbase/protostellar/request_generator/admin/query.rb +2 -0
- data/lib/couchbase/protostellar/request_generator/kv.rb +1 -1
- data/lib/couchbase/protostellar/scope.rb +4 -0
- data/lib/couchbase/utils/observability.rb +10 -4
- data/lib/couchbase/version.rb +1 -1
- metadata +11 -7
- data/lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb +0 -52
- data/lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb +0 -30
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/kv/v1/kv.proto for package 'Couchbase.Protostellar.Generated.KV.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Key-Value (KV) Service
|
|
5
|
+
#
|
|
6
|
+
# Provides full key-value document operations for Couchbase, including
|
|
7
|
+
# CRUD, sub-document lookups and mutations, binary append/prepend,
|
|
8
|
+
# atomic counters, pessimistic locking, and replica reads.
|
|
9
|
+
# All operations are scoped to a bucket/scope/collection/key address.
|
|
3
10
|
|
|
4
11
|
require 'grpc'
|
|
5
12
|
require 'couchbase/protostellar/generated/kv/v1/kv_pb'
|
|
@@ -10,6 +17,9 @@ module Couchbase
|
|
|
10
17
|
module KV
|
|
11
18
|
module V1
|
|
12
19
|
module KvService
|
|
20
|
+
# KvService provides key-value document operations against a Couchbase cluster.
|
|
21
|
+
# Operations are organized into reads, mutations, counters, binary operations,
|
|
22
|
+
# sub-document operations, and replica reads.
|
|
13
23
|
class Service
|
|
14
24
|
|
|
15
25
|
include ::GRPC::GenericService
|
|
@@ -18,22 +28,59 @@ module Couchbase
|
|
|
18
28
|
self.unmarshal_class_method = :decode
|
|
19
29
|
self.service_name = 'couchbase.kv.v1.KvService'
|
|
20
30
|
|
|
31
|
+
# Get retrieves a document by key. Supports field-level projection via the
|
|
32
|
+
# `project` field and optional compressed responses.
|
|
21
33
|
rpc :Get, ::Couchbase::Protostellar::Generated::KV::V1::GetRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetResponse
|
|
34
|
+
# GetAndTouch retrieves a document and simultaneously resets its expiry.
|
|
22
35
|
rpc :GetAndTouch, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchResponse
|
|
36
|
+
# GetAndLock retrieves a document and acquires a pessimistic lock for the
|
|
37
|
+
# specified duration. The lock must be released via Unlock or will
|
|
38
|
+
# auto-expire after lock_time_secs.
|
|
23
39
|
rpc :GetAndLock, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockResponse
|
|
40
|
+
# Unlock releases a pessimistic lock previously acquired by GetAndLock.
|
|
41
|
+
# Requires the CAS value returned by the locking operation.
|
|
24
42
|
rpc :Unlock, ::Couchbase::Protostellar::Generated::KV::V1::UnlockRequest, ::Couchbase::Protostellar::Generated::KV::V1::UnlockResponse
|
|
43
|
+
# Touch resets a document's expiry without retrieving its content.
|
|
25
44
|
rpc :Touch, ::Couchbase::Protostellar::Generated::KV::V1::TouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::TouchResponse
|
|
45
|
+
# Exists checks whether a document exists without retrieving its content.
|
|
46
|
+
# Returns a boolean result and the current CAS.
|
|
26
47
|
rpc :Exists, ::Couchbase::Protostellar::Generated::KV::V1::ExistsRequest, ::Couchbase::Protostellar::Generated::KV::V1::ExistsResponse
|
|
48
|
+
# Insert creates a new document. Fails if the document already exists.
|
|
49
|
+
# Supports durability requirements.
|
|
27
50
|
rpc :Insert, ::Couchbase::Protostellar::Generated::KV::V1::InsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::InsertResponse
|
|
51
|
+
# Upsert creates or replaces a document unconditionally.
|
|
52
|
+
# Supports preserving the existing expiry on update.
|
|
28
53
|
rpc :Upsert, ::Couchbase::Protostellar::Generated::KV::V1::UpsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::UpsertResponse
|
|
54
|
+
# Replace updates an existing document. Fails if the document does not exist.
|
|
55
|
+
# Supports optimistic locking via optional CAS.
|
|
29
56
|
rpc :Replace, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceRequest, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceResponse
|
|
57
|
+
# Remove deletes a document. Supports optimistic locking via optional CAS
|
|
58
|
+
# and durability requirements.
|
|
30
59
|
rpc :Remove, ::Couchbase::Protostellar::Generated::KV::V1::RemoveRequest, ::Couchbase::Protostellar::Generated::KV::V1::RemoveResponse
|
|
60
|
+
# Increment atomically increments a counter document by the specified delta.
|
|
61
|
+
# If the document does not exist and an initial value is provided, it is
|
|
62
|
+
# created with that value.
|
|
31
63
|
rpc :Increment, ::Couchbase::Protostellar::Generated::KV::V1::IncrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::IncrementResponse
|
|
64
|
+
# Decrement atomically decrements a counter document by the specified delta.
|
|
65
|
+
# If the document does not exist and an initial value is provided, it is
|
|
66
|
+
# created with that value.
|
|
32
67
|
rpc :Decrement, ::Couchbase::Protostellar::Generated::KV::V1::DecrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::DecrementResponse
|
|
68
|
+
# Append appends raw bytes to the end of an existing document's value.
|
|
33
69
|
rpc :Append, ::Couchbase::Protostellar::Generated::KV::V1::AppendRequest, ::Couchbase::Protostellar::Generated::KV::V1::AppendResponse
|
|
70
|
+
# Prepend prepends raw bytes to the beginning of an existing document's
|
|
71
|
+
# value.
|
|
34
72
|
rpc :Prepend, ::Couchbase::Protostellar::Generated::KV::V1::PrependRequest, ::Couchbase::Protostellar::Generated::KV::V1::PrependResponse
|
|
73
|
+
# LookupIn performs one or more sub-document lookup operations (get, exists,
|
|
74
|
+
# count) on paths within a JSON document. Supports xattr and access_deleted
|
|
75
|
+
# flags.
|
|
35
76
|
rpc :LookupIn, ::Couchbase::Protostellar::Generated::KV::V1::LookupInRequest, ::Couchbase::Protostellar::Generated::KV::V1::LookupInResponse
|
|
77
|
+
# MutateIn performs one or more sub-document mutation operations on paths
|
|
78
|
+
# within a JSON document. Supports insert, upsert, replace, remove, array
|
|
79
|
+
# operations, and counters at the sub-document level.
|
|
36
80
|
rpc :MutateIn, ::Couchbase::Protostellar::Generated::KV::V1::MutateInRequest, ::Couchbase::Protostellar::Generated::KV::V1::MutateInResponse
|
|
81
|
+
# GetAllReplicas returns the document from the active node and all replica
|
|
82
|
+
# nodes as a server-streamed response. Each response indicates whether it
|
|
83
|
+
# is from a replica via the is_replica flag.
|
|
37
84
|
rpc :GetAllReplicas, ::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasRequest, stream(::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasResponse)
|
|
38
85
|
end
|
|
39
86
|
|
|
@@ -8,33 +8,10 @@ require 'google/protobuf/duration_pb'
|
|
|
8
8
|
require 'couchbase/protostellar/generated/kv/v1/kv_pb'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\
|
|
11
|
+
descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\xc8\x0c\n\x0cQueryRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tstatement\x18\x03 \x01(\t\x12\x16\n\tread_only\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x15\n\x08prepared\x18\x05 \x01(\x08H\x03\x88\x01\x01\x12K\n\x0etuning_options\x18\x06 \x01(\x0b\x32..couchbase.query.v1.QueryRequest.TuningOptionsH\x04\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x07 \x01(\tH\x05\x88\x01\x01\x12O\n\x10scan_consistency\x18\x08 \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.ScanConsistencyH\x06\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\t \x03(\x0c\x12O\n\x10named_parameters\x18\n \x03(\x0b\x32\x35.couchbase.query.v1.QueryRequest.NamedParametersEntry\x12\x17\n\nflex_index\x18\x0b \x01(\x08H\x07\x88\x01\x01\x12\x1c\n\x0fpreserve_expiry\x18\x0c \x01(\x08H\x08\x88\x01\x01\x12\x37\n\x0f\x63onsistent_with\x18\r \x03(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x12O\n\x10\x64urability_level\x18\x0f \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.DurabilityLevelH\t\x88\x01\x01\x12G\n\x0cprofile_mode\x18\x0e \x01(\x0e\x32,.couchbase.query.v1.QueryRequest.ProfileModeH\n\x88\x01\x01\x1a\xb4\x02\n\rTuningOptions\x12\x1c\n\x0fmax_parallelism\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0epipeline_batch\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cpipeline_cap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x31\n\tscan_wait\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationH\x03\x88\x01\x01\x12\x15\n\x08scan_cap\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1c\n\x0f\x64isable_metrics\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x12\n\x10_max_parallelismB\x11\n\x0f_pipeline_batchB\x0f\n\r_pipeline_capB\x0c\n\n_scan_waitB\x0b\n\t_scan_capB\x12\n\x10_disable_metrics\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\"\xaa\x01\n\x0f\x44urabilityLevel\x12\x19\n\x15\x44URABILITY_LEVEL_NONE\x10\x00\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x01\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x02\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x03\"V\n\x0bProfileMode\x12\x14\n\x10PROFILE_MODE_OFF\x10\x00\x12\x17\n\x13PROFILE_MODE_PHASES\x10\x01\x12\x18\n\x14PROFILE_MODE_TIMINGS\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x0c\n\n_read_onlyB\x0b\n\t_preparedB\x11\n\x0f_tuning_optionsB\x14\n\x12_client_context_idB\x13\n\x11_scan_consistencyB\r\n\x0b_flex_indexB\x12\n\x10_preserve_expiryB\x13\n\x11_durability_levelB\x0f\n\r_profile_mode\"\xad\x07\n\rQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12\x42\n\tmeta_data\x18\x02 \x01(\x0b\x32*.couchbase.query.v1.QueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xbb\x06\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12H\n\x07metrics\x18\x03 \x01(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.MetricsH\x00\x88\x01\x01\x12\x41\n\x06status\x18\x04 \x01(\x0e\x32\x31.couchbase.query.v1.QueryResponse.MetaData.Status\x12\x44\n\x08warnings\x18\x05 \x03(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.Warning\x12\x14\n\x07profile\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12\x11\n\tsignature\x18\x07 \x01(\x0c\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x1a\xf0\x01\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\"\xce\x01\n\x06Status\x12\x12\n\x0eSTATUS_RUNNING\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x11\n\rSTATUS_ERRORS\x10\x02\x12\x14\n\x10STATUS_COMPLETED\x10\x03\x12\x12\n\x0eSTATUS_STOPPED\x10\x04\x12\x12\n\x0eSTATUS_TIMEOUT\x10\x05\x12\x11\n\rSTATUS_CLOSED\x10\x06\x12\x10\n\x0cSTATUS_FATAL\x10\x07\x12\x12\n\x0eSTATUS_ABORTED\x10\x08\x12\x12\n\x0eSTATUS_UNKNOWN\x10\tB\n\n\x08_metricsB\n\n\x08_profileB\x0c\n\n_meta_data2`\n\x0cQueryService\x12P\n\x05Query\x12 .couchbase.query.v1.QueryRequest\x1a!.couchbase.query.v1.QueryResponse\"\x00\x30\x01\x42\xec\x01\n*com.couchbase.client.protostellar.query.v1P\x01Z>github.com/couchbase/goprotostellar/genproto/query_v1;query_v1\xaa\x02\x1f\x43ouchbase.Protostellar.Query.V1\xca\x02)Couchbase\\Protostellar\\Generated\\Query\\V1\xea\x02-Couchbase::Protostellar::Generated::Query::V1b\x06proto3"
|
|
12
12
|
|
|
13
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
|
17
|
-
rescue TypeError => e
|
|
18
|
-
# Compatibility code: will be removed in the next major version.
|
|
19
|
-
require 'google/protobuf/descriptor_pb'
|
|
20
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
21
|
-
parsed.clear_dependency
|
|
22
|
-
serialized = parsed.class.encode(parsed)
|
|
23
|
-
file = pool.add_serialized_file(serialized)
|
|
24
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
25
|
-
imports = [
|
|
26
|
-
["couchbase.kv.v1.MutationToken", "couchbase/kv/v1/kv.proto"],
|
|
27
|
-
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
13
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
15
|
|
|
39
16
|
module Couchbase
|
|
40
17
|
module Protostellar
|
|
@@ -44,6 +21,7 @@ module Couchbase
|
|
|
44
21
|
QueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest").msgclass
|
|
45
22
|
QueryRequest::TuningOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.TuningOptions").msgclass
|
|
46
23
|
QueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ScanConsistency").enummodule
|
|
24
|
+
QueryRequest::DurabilityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.DurabilityLevel").enummodule
|
|
47
25
|
QueryRequest::ProfileMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ProfileMode").enummodule
|
|
48
26
|
QueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse").msgclass
|
|
49
27
|
QueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse.MetaData").msgclass
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/query/v1/query.proto for package 'Couchbase.Protostellar.Generated.Query.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Query Service
|
|
5
|
+
#
|
|
6
|
+
# Provides N1QL query execution against a Couchbase cluster.
|
|
7
|
+
# Queries are submitted as statements and results are returned as a
|
|
8
|
+
# server-streamed sequence of row batches with optional metadata.
|
|
3
9
|
|
|
4
10
|
require 'grpc'
|
|
5
11
|
require 'couchbase/protostellar/generated/query/v1/query_pb'
|
|
@@ -10,6 +16,7 @@ module Couchbase
|
|
|
10
16
|
module Query
|
|
11
17
|
module V1
|
|
12
18
|
module QueryService
|
|
19
|
+
# QueryService provides N1QL (SQL++) query execution.
|
|
13
20
|
class Service
|
|
14
21
|
|
|
15
22
|
include ::GRPC::GenericService
|
|
@@ -18,6 +25,9 @@ module Couchbase
|
|
|
18
25
|
self.unmarshal_class_method = :decode
|
|
19
26
|
self.service_name = 'couchbase.query.v1.QueryService'
|
|
20
27
|
|
|
28
|
+
# Query executes a N1QL statement and streams back result rows and metadata.
|
|
29
|
+
# Results are delivered incrementally — rows arrive first, followed by a
|
|
30
|
+
# final response containing MetaData (status, metrics, warnings).
|
|
21
31
|
rpc :Query, ::Couchbase::Protostellar::Generated::Query::V1::QueryRequest, stream(::Couchbase::Protostellar::Generated::Query::V1::QueryResponse)
|
|
22
32
|
end
|
|
23
33
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: couchbase/routing/v2/routing.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\"couchbase/routing/v2/routing.proto\x12\x14\x63ouchbase.routing.v2\"?\n\x13WatchRoutingRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_name\"E\n\rServerRouting\x12\x19\n\x11num_local_servers\x18\x01 \x01(\r\x12\x19\n\x11num_group_servers\x18\x02 \x01(\r\"V\n\x0eVbucketRouting\x12\x14\n\x0cnum_vbuckets\x18\x01 \x01(\r\x12\x16\n\x0elocal_vbuckets\x18\x02 \x03(\r\x12\x16\n\x0egroup_vbuckets\x18\x03 \x03(\r\"\xa3\x04\n\x14WatchRoutingResponse\x12@\n\x0eserver_routing\x18\x01 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x00\x88\x01\x01\x12?\n\rviews_routing\x18\x02 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x01\x88\x01\x01\x12?\n\rquery_routing\x18\x03 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x02\x88\x01\x01\x12@\n\x0esearch_routing\x18\x04 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x03\x88\x01\x01\x12\x43\n\x11\x61nalytics_routing\x18\x05 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x04\x88\x01\x01\x12G\n\x14vbucket_data_routing\x18\x06 \x01(\x0b\x32$.couchbase.routing.v2.VbucketRoutingH\x05\x88\x01\x01\x42\x11\n\x0f_server_routingB\x10\n\x0e_views_routingB\x10\n\x0e_query_routingB\x11\n\x0f_search_routingB\x14\n\x12_analytics_routingB\x17\n\x15_vbucket_data_routing2{\n\x0eRoutingService\x12i\n\x0cWatchRouting\x12).couchbase.routing.v2.WatchRoutingRequest\x1a*.couchbase.routing.v2.WatchRoutingResponse\"\x00\x30\x01\x42\xf8\x01\n,com.couchbase.client.protostellar.routing.v2P\x01ZBgithub.com/couchbase/goprotostellar/genproto/routing_v2;routing_v2\xaa\x02!Couchbase.Protostellar.Routing.V2\xca\x02+Couchbase\\Protostellar\\Generated\\Routing\\V2\xea\x02/Couchbase::Protostellar::Generated::Routing::V2b\x06proto3"
|
|
9
|
+
|
|
10
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
12
|
+
|
|
13
|
+
module Couchbase
|
|
14
|
+
module Protostellar
|
|
15
|
+
module Generated
|
|
16
|
+
module Routing
|
|
17
|
+
module V2
|
|
18
|
+
WatchRoutingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingRequest").msgclass
|
|
19
|
+
ServerRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.ServerRouting").msgclass
|
|
20
|
+
VbucketRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.VbucketRouting").msgclass
|
|
21
|
+
WatchRoutingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingResponse").msgclass
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: couchbase/routing/v2/routing.proto for package 'Couchbase.Protostellar.Generated.Routing.V2'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Routing Service (v2)
|
|
5
|
+
#
|
|
6
|
+
# Provides cluster topology and routing information via a long-lived
|
|
7
|
+
# server-streamed connection. Clients use this to discover which
|
|
8
|
+
# services are available, how many servers serve each service, and
|
|
9
|
+
# the vbucket distribution for data routing.
|
|
10
|
+
|
|
11
|
+
require 'grpc'
|
|
12
|
+
require 'couchbase/protostellar/generated/routing/v2/routing_pb'
|
|
13
|
+
|
|
14
|
+
module Couchbase
|
|
15
|
+
module Protostellar
|
|
16
|
+
module Generated
|
|
17
|
+
module Routing
|
|
18
|
+
module V2
|
|
19
|
+
module RoutingService
|
|
20
|
+
# RoutingService provides cluster topology updates as a server-streamed
|
|
21
|
+
# response. The stream emits a new WatchRoutingResponse whenever the
|
|
22
|
+
# cluster topology changes.
|
|
23
|
+
class Service
|
|
24
|
+
|
|
25
|
+
include ::GRPC::GenericService
|
|
26
|
+
|
|
27
|
+
self.marshal_class_method = :encode
|
|
28
|
+
self.unmarshal_class_method = :decode
|
|
29
|
+
self.service_name = 'couchbase.routing.v2.RoutingService'
|
|
30
|
+
|
|
31
|
+
# WatchRouting opens a long-lived stream that delivers routing
|
|
32
|
+
# configuration updates. If bucket_name is specified, the response
|
|
33
|
+
# includes vbucket routing for that specific bucket.
|
|
34
|
+
rpc :WatchRouting, ::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingRequest, stream(::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingResponse)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
Stub = Service.rpc_stub_class
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -8,33 +8,10 @@ require 'google/protobuf/duration_pb'
|
|
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
descriptor_data = "\n couchbase/search/v1/search.proto\x12\x13\x63ouchbase.search.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"^\n\x11\x42ooleanFieldQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x06 \x01(\x08\x42\x08\n\x06_boostB\x08\n\x06_field\"\x81\x02\n\x0c\x42ooleanQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x38\n\x04must\x18\x02 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x01\x88\x01\x01\x12<\n\x08must_not\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x02\x88\x01\x01\x12:\n\x06should\x18\x04 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x03\x88\x01\x01\x42\x08\n\x06_boostB\x07\n\x05_mustB\x0b\n\t_must_notB\t\n\x07_should\"]\n\x10\x43onjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.QueryB\x08\n\x06_boost\"\xcc\x01\n\x0e\x44\x61teRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x64\x61te_time_parser\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nstart_date\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x13\n\x11_date_time_parserB\r\n\x0b_start_dateB\x0b\n\t_end_date\"\x7f\n\x10\x44isjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.Query\x12\x14\n\x07minimum\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_boostB\n\n\x08_minimum\"7\n\nDocIdQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x03 \x03(\tB\x08\n\x06_boost\"-\n\x06LatLng\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"\xb3\x01\n\x13GeoBoundingBoxQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08top_left\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x31\n\x0c\x62ottom_right\x18\x04 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x8d\x01\n\x10GeoDistanceQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x10\n\x08\x64istance\x18\x04 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"|\n\x0fGeoPolygonQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08vertices\x18\x03 \x03(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x0f\n\rMatchAllQuery\"\x10\n\x0eMatchNoneQuery\"\x82\x01\n\x10MatchPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06phrase\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzer\"\xcc\x02\n\nMatchQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tfuzziness\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12?\n\x08operator\x18\x06 \x01(\x0e\x32(.couchbase.search.v1.MatchQuery.OperatorH\x04\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x07 \x01(\x04H\x05\x88\x01\x01\"-\n\x08Operator\x12\x0f\n\x0bOPERATOR_OR\x10\x00\x12\x10\n\x0cOPERATOR_AND\x10\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzerB\x0c\n\n_fuzzinessB\x0b\n\t_operatorB\x10\n\x0e_prefix_length\"\xdf\x01\n\x11NumericRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x10\n\x03max\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"X\n\x0bPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05terms\x18\x03 \x03(\tB\x08\n\x06_boostB\x08\n\x06_field\"Y\n\x0bPrefixQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06prefix\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"F\n\x10QueryStringQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x0cquery_string\x18\x03 \x01(\tB\x08\n\x06_boost\"Y\n\x0bRegexpQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06regexp\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xa9\x01\n\tTermQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04term\x18\x03 \x01(\t\x12\x16\n\tfuzziness\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0c\n\n_fuzzinessB\x10\n\x0e_prefix_length\"\xdc\x01\n\x0eTermRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03max\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x08 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"]\n\rWildcardQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08wildcard\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xd5\n\n\x05Query\x12\x45\n\x13\x62oolean_field_query\x18\x01 \x01(\x0b\x32&.couchbase.search.v1.BooleanFieldQueryH\x00\x12:\n\rboolean_query\x18\x02 \x01(\x0b\x32!.couchbase.search.v1.BooleanQueryH\x00\x12\x42\n\x11\x63onjunction_query\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x00\x12?\n\x10\x64\x61te_range_query\x18\x04 \x01(\x0b\x32#.couchbase.search.v1.DateRangeQueryH\x00\x12\x42\n\x11\x64isjunction_query\x18\x05 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x00\x12\x37\n\x0c\x64oc_id_query\x18\x06 \x01(\x0b\x32\x1f.couchbase.search.v1.DocIdQueryH\x00\x12J\n\x16geo_bounding_box_query\x18\x07 \x01(\x0b\x32(.couchbase.search.v1.GeoBoundingBoxQueryH\x00\x12\x43\n\x12geo_distance_query\x18\x08 \x01(\x0b\x32%.couchbase.search.v1.GeoDistanceQueryH\x00\x12\x41\n\x11geo_polygon_query\x18\t \x01(\x0b\x32$.couchbase.search.v1.GeoPolygonQueryH\x00\x12=\n\x0fmatch_all_query\x18\n \x01(\x0b\x32\".couchbase.search.v1.MatchAllQueryH\x00\x12?\n\x10match_none_query\x18\x0b \x01(\x0b\x32#.couchbase.search.v1.MatchNoneQueryH\x00\x12\x43\n\x12match_phrase_query\x18\x0c \x01(\x0b\x32%.couchbase.search.v1.MatchPhraseQueryH\x00\x12\x36\n\x0bmatch_query\x18\r \x01(\x0b\x32\x1f.couchbase.search.v1.MatchQueryH\x00\x12\x45\n\x13numeric_range_query\x18\x0e \x01(\x0b\x32&.couchbase.search.v1.NumericRangeQueryH\x00\x12\x38\n\x0cphrase_query\x18\x0f \x01(\x0b\x32 .couchbase.search.v1.PhraseQueryH\x00\x12\x38\n\x0cprefix_query\x18\x10 \x01(\x0b\x32 .couchbase.search.v1.PrefixQueryH\x00\x12\x43\n\x12query_string_query\x18\x11 \x01(\x0b\x32%.couchbase.search.v1.QueryStringQueryH\x00\x12\x38\n\x0cregexp_query\x18\x12 \x01(\x0b\x32 .couchbase.search.v1.RegexpQueryH\x00\x12\x34\n\nterm_query\x18\x13 \x01(\x0b\x32\x1e.couchbase.search.v1.TermQueryH\x00\x12?\n\x10term_range_query\x18\x14 \x01(\x0b\x32#.couchbase.search.v1.TermRangeQueryH\x00\x12<\n\x0ewildcard_query\x18\x15 \x01(\x0b\x32\".couchbase.search.v1.WildcardQueryH\x00\x42\x07\n\x05query\"^\n\x0c\x46ieldSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12\x0f\n\x07missing\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\x12\x0c\n\x04type\x18\x05 \x01(\t\"r\n\x12GeoDistanceSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x0c\n\x04unit\x18\x04 \x01(\t\"\x1f\n\tIdSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\"\n\x0cScoreSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\x8b\x02\n\x07Sorting\x12:\n\rfield_sorting\x18\x01 \x01(\x0b\x32!.couchbase.search.v1.FieldSortingH\x00\x12G\n\x14geo_distance_sorting\x18\x02 \x01(\x0b\x32\'.couchbase.search.v1.GeoDistanceSortingH\x00\x12\x34\n\nid_sorting\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.IdSortingH\x00\x12:\n\rscore_sorting\x18\x04 \x01(\x0b\x32!.couchbase.search.v1.ScoreSortingH\x00\x42\t\n\x07sorting\"Q\n\tDateRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05start\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"b\n\x0e\x44\x61teRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x33\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x1e.couchbase.search.v1.DateRange\"P\n\x0cNumericRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03min\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x03 \x01(\x02H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"k\n\x11NumericRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x39\n\x0enumeric_ranges\x18\x03 \x03(\x0b\x32!.couchbase.search.v1.NumericRange\"(\n\tTermFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\"\xce\x01\n\x05\x46\x61\x63\x65t\x12?\n\x10\x64\x61te_range_facet\x18\x01 \x01(\x0b\x32#.couchbase.search.v1.DateRangeFacetH\x00\x12\x45\n\x13numeric_range_facet\x18\x02 \x01(\x0b\x32&.couchbase.search.v1.NumericRangeFacetH\x00\x12\x34\n\nterm_facet\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.TermFacetH\x00\x42\x07\n\x05\x66\x61\x63\x65t\"\xca\x06\n\x12SearchQueryRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12)\n\x05query\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Query\x12Q\n\x10scan_consistency\x18\x03 \x01(\x0e\x32\x37.couchbase.search.v1.SearchQueryRequest.ScanConsistency\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x0c\n\x04skip\x18\x05 \x01(\r\x12\x1b\n\x13include_explanation\x18\x06 \x01(\x08\x12O\n\x0fhighlight_style\x18\x07 \x01(\x0e\x32\x36.couchbase.search.v1.SearchQueryRequest.HighlightStyle\x12\x18\n\x10highlight_fields\x18\x08 \x03(\t\x12\x0e\n\x06\x66ields\x18\t \x03(\t\x12*\n\x04sort\x18\n \x03(\x0b\x32\x1c.couchbase.search.v1.Sorting\x12\x17\n\x0f\x64isable_scoring\x18\x0b \x01(\x08\x12\x13\n\x0b\x63ollections\x18\x0c \x03(\t\x12\x19\n\x11include_locations\x18\r \x01(\x08\x12\x43\n\x06\x66\x61\x63\x65ts\x18\x0e \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryRequest.FacetsEntry\x12\x18\n\x0b\x62ucket_name\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x10 \x01(\tH\x01\x88\x01\x01\x1aI\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Facet:\x02\x38\x01\"3\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\"a\n\x0eHighlightStyle\x12\x1b\n\x17HIGHLIGHT_STYLE_DEFAULT\x10\x00\x12\x18\n\x14HIGHLIGHT_STYLE_HTML\x10\x01\x12\x18\n\x14HIGHLIGHT_STYLE_ANSI\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x9a\x13\n\x13SearchQueryResponse\x12\x45\n\x04hits\x18\x01 \x03(\x0b\x32\x37.couchbase.search.v1.SearchQueryResponse.SearchQueryRow\x12\x44\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetsEntry\x12I\n\tmeta_data\x18\x03 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xd9\x03\n\x0eSearchQueryRow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x01\x12\r\n\x05index\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\x0c\x12\x44\n\tlocations\x18\x05 \x03(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Location\x12Y\n\tfragments\x18\x06 \x03(\x0b\x32\x46.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FragmentsEntry\x12S\n\x06\x66ields\x18\x07 \x03(\x0b\x32\x43.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FieldsEntry\x1a\x63\n\x0e\x46ragmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Fragment:\x02\x38\x01\x1a-\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1an\n\x08Location\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x10\n\x08position\x18\x03 \x01(\r\x12\r\n\x05start\x18\x04 \x01(\r\x12\x0b\n\x03\x65nd\x18\x05 \x01(\r\x12\x17\n\x0f\x61rray_positions\x18\x06 \x03(\r\x1a\x1b\n\x08\x46ragment\x12\x0f\n\x07\x63ontent\x18\x01 \x03(\t\x1a\xa9\x02\n\x0b\x46\x61\x63\x65tResult\x12N\n\nterm_facet\x18\x01 \x01(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.TermFacetResultH\x00\x12Y\n\x10\x64\x61te_range_facet\x18\x02 \x01(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.DateRangeFacetResultH\x00\x12_\n\x13numeric_range_facet\x18\x03 \x01(\x0b\x32@.couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResultH\x00\x42\x0e\n\x0csearch_facet\x1a\x37\n\nTermResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x1a\x99\x01\n\x0fTermFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12\x42\n\x05terms\x18\x06 \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryResponse.TermResultJ\x04\x08\x01\x10\x02\x1a\x81\x01\n\x0f\x44\x61teRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12)\n\x05start\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xa9\x01\n\x14\x44\x61teRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12M\n\x0b\x64\x61te_ranges\x18\x06 \x03(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.DateRangeResultJ\x04\x08\x01\x10\x02\x1aJ\n\x12NumericRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12\x0b\n\x03min\x18\x03 \x01(\x04\x12\x0b\n\x03max\x18\x04 \x01(\x04\x1a\xb2\x01\n\x17NumericRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12S\n\x0enumeric_ranges\x18\x06 \x03(\x0b\x32;.couchbase.search.v1.SearchQueryResponse.NumericRangeResultJ\x04\x08\x01\x10\x02\x1a\xd1\x01\n\x08MetaData\x12G\n\x07metrics\x18\x01 \x01(\x0b\x32\x36.couchbase.search.v1.SearchQueryResponse.SearchMetrics\x12M\n\x06\x65rrors\x18\x02 \x03(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.MetaData.ErrorsEntry\x1a-\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xc8\x01\n\rSearchMetrics\x12\x31\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\ntotal_rows\x18\x02 \x01(\x04\x12\x11\n\tmax_score\x18\x03 \x01(\x01\x12\x1d\n\x15total_partition_count\x18\x04 \x01(\x04\x12\x1f\n\x17success_partition_count\x18\x05 \x01(\x04\x12\x1d\n\x15\x65rror_partition_count\x18\x06 \x01(\x04\x1a\x63\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetResult:\x02\x38\x01\x42\x0c\n\n_meta_data2u\n\rSearchService\x12\x64\n\x0bSearchQuery\x12\'.couchbase.search.v1.SearchQueryRequest\x1a(.couchbase.search.v1.SearchQueryResponse\"\x00\x30\x01\x42\xf2\x01\n+com.couchbase.client.protostellar.search.v1P\x01Z@github.com/couchbase/goprotostellar/genproto/search_v1;search_v1\xaa\x02 Couchbase.Protostellar.Search.V1\xca\x02*Couchbase\\Protostellar\\Generated\\Search\\V1\xea\x02.Couchbase::Protostellar::Generated::Search::V1b\x06proto3"
|
|
11
|
+
descriptor_data = "\n couchbase/search/v1/search.proto\x12\x13\x63ouchbase.search.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"^\n\x11\x42ooleanFieldQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x06 \x01(\x08\x42\x08\n\x06_boostB\x08\n\x06_field\"\x81\x02\n\x0c\x42ooleanQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x38\n\x04must\x18\x02 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x01\x88\x01\x01\x12<\n\x08must_not\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x02\x88\x01\x01\x12:\n\x06should\x18\x04 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x03\x88\x01\x01\x42\x08\n\x06_boostB\x07\n\x05_mustB\x0b\n\t_must_notB\t\n\x07_should\"]\n\x10\x43onjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.QueryB\x08\n\x06_boost\"\xcc\x01\n\x0e\x44\x61teRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x64\x61te_time_parser\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nstart_date\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x13\n\x11_date_time_parserB\r\n\x0b_start_dateB\x0b\n\t_end_date\"\x7f\n\x10\x44isjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.Query\x12\x14\n\x07minimum\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_boostB\n\n\x08_minimum\"7\n\nDocIdQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x03 \x03(\tB\x08\n\x06_boost\"-\n\x06LatLng\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"\xb3\x01\n\x13GeoBoundingBoxQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08top_left\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x31\n\x0c\x62ottom_right\x18\x04 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x8d\x01\n\x10GeoDistanceQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x10\n\x08\x64istance\x18\x04 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"|\n\x0fGeoPolygonQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08vertices\x18\x03 \x03(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x0f\n\rMatchAllQuery\"\x10\n\x0eMatchNoneQuery\"\x82\x01\n\x10MatchPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06phrase\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzer\"\xcc\x02\n\nMatchQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tfuzziness\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12?\n\x08operator\x18\x06 \x01(\x0e\x32(.couchbase.search.v1.MatchQuery.OperatorH\x04\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x07 \x01(\x04H\x05\x88\x01\x01\"-\n\x08Operator\x12\x0f\n\x0bOPERATOR_OR\x10\x00\x12\x10\n\x0cOPERATOR_AND\x10\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzerB\x0c\n\n_fuzzinessB\x0b\n\t_operatorB\x10\n\x0e_prefix_length\"\xdf\x01\n\x11NumericRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x10\n\x03max\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"X\n\x0bPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05terms\x18\x03 \x03(\tB\x08\n\x06_boostB\x08\n\x06_field\"Y\n\x0bPrefixQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06prefix\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"F\n\x10QueryStringQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x0cquery_string\x18\x03 \x01(\tB\x08\n\x06_boost\"Y\n\x0bRegexpQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06regexp\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xa9\x01\n\tTermQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04term\x18\x03 \x01(\t\x12\x16\n\tfuzziness\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0c\n\n_fuzzinessB\x10\n\x0e_prefix_length\"\xdc\x01\n\x0eTermRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03max\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x08 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"]\n\rWildcardQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08wildcard\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xd5\n\n\x05Query\x12\x45\n\x13\x62oolean_field_query\x18\x01 \x01(\x0b\x32&.couchbase.search.v1.BooleanFieldQueryH\x00\x12:\n\rboolean_query\x18\x02 \x01(\x0b\x32!.couchbase.search.v1.BooleanQueryH\x00\x12\x42\n\x11\x63onjunction_query\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x00\x12?\n\x10\x64\x61te_range_query\x18\x04 \x01(\x0b\x32#.couchbase.search.v1.DateRangeQueryH\x00\x12\x42\n\x11\x64isjunction_query\x18\x05 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x00\x12\x37\n\x0c\x64oc_id_query\x18\x06 \x01(\x0b\x32\x1f.couchbase.search.v1.DocIdQueryH\x00\x12J\n\x16geo_bounding_box_query\x18\x07 \x01(\x0b\x32(.couchbase.search.v1.GeoBoundingBoxQueryH\x00\x12\x43\n\x12geo_distance_query\x18\x08 \x01(\x0b\x32%.couchbase.search.v1.GeoDistanceQueryH\x00\x12\x41\n\x11geo_polygon_query\x18\t \x01(\x0b\x32$.couchbase.search.v1.GeoPolygonQueryH\x00\x12=\n\x0fmatch_all_query\x18\n \x01(\x0b\x32\".couchbase.search.v1.MatchAllQueryH\x00\x12?\n\x10match_none_query\x18\x0b \x01(\x0b\x32#.couchbase.search.v1.MatchNoneQueryH\x00\x12\x43\n\x12match_phrase_query\x18\x0c \x01(\x0b\x32%.couchbase.search.v1.MatchPhraseQueryH\x00\x12\x36\n\x0bmatch_query\x18\r \x01(\x0b\x32\x1f.couchbase.search.v1.MatchQueryH\x00\x12\x45\n\x13numeric_range_query\x18\x0e \x01(\x0b\x32&.couchbase.search.v1.NumericRangeQueryH\x00\x12\x38\n\x0cphrase_query\x18\x0f \x01(\x0b\x32 .couchbase.search.v1.PhraseQueryH\x00\x12\x38\n\x0cprefix_query\x18\x10 \x01(\x0b\x32 .couchbase.search.v1.PrefixQueryH\x00\x12\x43\n\x12query_string_query\x18\x11 \x01(\x0b\x32%.couchbase.search.v1.QueryStringQueryH\x00\x12\x38\n\x0cregexp_query\x18\x12 \x01(\x0b\x32 .couchbase.search.v1.RegexpQueryH\x00\x12\x34\n\nterm_query\x18\x13 \x01(\x0b\x32\x1e.couchbase.search.v1.TermQueryH\x00\x12?\n\x10term_range_query\x18\x14 \x01(\x0b\x32#.couchbase.search.v1.TermRangeQueryH\x00\x12<\n\x0ewildcard_query\x18\x15 \x01(\x0b\x32\".couchbase.search.v1.WildcardQueryH\x00\x42\x07\n\x05query\"^\n\x0c\x46ieldSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12\x0f\n\x07missing\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\x12\x0c\n\x04type\x18\x05 \x01(\t\"r\n\x12GeoDistanceSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x0c\n\x04unit\x18\x04 \x01(\t\"\x1f\n\tIdSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\"\n\x0cScoreSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\x8b\x02\n\x07Sorting\x12:\n\rfield_sorting\x18\x01 \x01(\x0b\x32!.couchbase.search.v1.FieldSortingH\x00\x12G\n\x14geo_distance_sorting\x18\x02 \x01(\x0b\x32\'.couchbase.search.v1.GeoDistanceSortingH\x00\x12\x34\n\nid_sorting\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.IdSortingH\x00\x12:\n\rscore_sorting\x18\x04 \x01(\x0b\x32!.couchbase.search.v1.ScoreSortingH\x00\x42\t\n\x07sorting\"Q\n\tDateRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05start\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"b\n\x0e\x44\x61teRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x33\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x1e.couchbase.search.v1.DateRange\"P\n\x0cNumericRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03min\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x03 \x01(\x02H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"k\n\x11NumericRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x39\n\x0enumeric_ranges\x18\x03 \x03(\x0b\x32!.couchbase.search.v1.NumericRange\"(\n\tTermFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\"\xce\x01\n\x05\x46\x61\x63\x65t\x12?\n\x10\x64\x61te_range_facet\x18\x01 \x01(\x0b\x32#.couchbase.search.v1.DateRangeFacetH\x00\x12\x45\n\x13numeric_range_facet\x18\x02 \x01(\x0b\x32&.couchbase.search.v1.NumericRangeFacetH\x00\x12\x34\n\nterm_facet\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.TermFacetH\x00\x42\x07\n\x05\x66\x61\x63\x65t\"R\n\x08KnnQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\t\n\x01k\x18\x02 \x01(\x03\x12\x0e\n\x06vector\x18\x03 \x03(\x02\x12\x12\n\x05\x62oost\x18\x04 \x01(\x02H\x00\x88\x01\x01\x42\x08\n\x06_boost\"\xc4\x07\n\x12SearchQueryRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12)\n\x05query\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Query\x12Q\n\x10scan_consistency\x18\x03 \x01(\x0e\x32\x37.couchbase.search.v1.SearchQueryRequest.ScanConsistency\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x0c\n\x04skip\x18\x05 \x01(\r\x12\x1b\n\x13include_explanation\x18\x06 \x01(\x08\x12O\n\x0fhighlight_style\x18\x07 \x01(\x0e\x32\x36.couchbase.search.v1.SearchQueryRequest.HighlightStyle\x12\x18\n\x10highlight_fields\x18\x08 \x03(\t\x12\x0e\n\x06\x66ields\x18\t \x03(\t\x12*\n\x04sort\x18\n \x03(\x0b\x32\x1c.couchbase.search.v1.Sorting\x12\x17\n\x0f\x64isable_scoring\x18\x0b \x01(\x08\x12\x13\n\x0b\x63ollections\x18\x0c \x03(\t\x12\x19\n\x11include_locations\x18\r \x01(\x08\x12\x43\n\x06\x66\x61\x63\x65ts\x18\x0e \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryRequest.FacetsEntry\x12*\n\x03knn\x18\x11 \x03(\x0b\x32\x1d.couchbase.search.v1.KnnQuery\x12;\n\x0cknn_operator\x18\x12 \x01(\x0e\x32 .couchbase.search.v1.KnnOperatorH\x00\x88\x01\x01\x12\x18\n\x0b\x62ucket_name\x18\x0f \x01(\tH\x01\x88\x01\x01\x12\x17\n\nscope_name\x18\x10 \x01(\tH\x02\x88\x01\x01\x1aI\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Facet:\x02\x38\x01\"3\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\"a\n\x0eHighlightStyle\x12\x1b\n\x17HIGHLIGHT_STYLE_DEFAULT\x10\x00\x12\x18\n\x14HIGHLIGHT_STYLE_HTML\x10\x01\x12\x18\n\x14HIGHLIGHT_STYLE_ANSI\x10\x02\x42\x0f\n\r_knn_operatorB\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x9a\x13\n\x13SearchQueryResponse\x12\x45\n\x04hits\x18\x01 \x03(\x0b\x32\x37.couchbase.search.v1.SearchQueryResponse.SearchQueryRow\x12\x44\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetsEntry\x12I\n\tmeta_data\x18\x03 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xd9\x03\n\x0eSearchQueryRow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x01\x12\r\n\x05index\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\x0c\x12\x44\n\tlocations\x18\x05 \x03(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Location\x12Y\n\tfragments\x18\x06 \x03(\x0b\x32\x46.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FragmentsEntry\x12S\n\x06\x66ields\x18\x07 \x03(\x0b\x32\x43.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FieldsEntry\x1a\x63\n\x0e\x46ragmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Fragment:\x02\x38\x01\x1a-\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1an\n\x08Location\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x10\n\x08position\x18\x03 \x01(\r\x12\r\n\x05start\x18\x04 \x01(\r\x12\x0b\n\x03\x65nd\x18\x05 \x01(\r\x12\x17\n\x0f\x61rray_positions\x18\x06 \x03(\r\x1a\x1b\n\x08\x46ragment\x12\x0f\n\x07\x63ontent\x18\x01 \x03(\t\x1a\xa9\x02\n\x0b\x46\x61\x63\x65tResult\x12N\n\nterm_facet\x18\x01 \x01(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.TermFacetResultH\x00\x12Y\n\x10\x64\x61te_range_facet\x18\x02 \x01(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.DateRangeFacetResultH\x00\x12_\n\x13numeric_range_facet\x18\x03 \x01(\x0b\x32@.couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResultH\x00\x42\x0e\n\x0csearch_facet\x1a\x37\n\nTermResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x1a\x99\x01\n\x0fTermFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12\x42\n\x05terms\x18\x06 \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryResponse.TermResultJ\x04\x08\x01\x10\x02\x1a\x81\x01\n\x0f\x44\x61teRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12)\n\x05start\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xa9\x01\n\x14\x44\x61teRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12M\n\x0b\x64\x61te_ranges\x18\x06 \x03(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.DateRangeResultJ\x04\x08\x01\x10\x02\x1aJ\n\x12NumericRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12\x0b\n\x03min\x18\x03 \x01(\x04\x12\x0b\n\x03max\x18\x04 \x01(\x04\x1a\xb2\x01\n\x17NumericRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12S\n\x0enumeric_ranges\x18\x06 \x03(\x0b\x32;.couchbase.search.v1.SearchQueryResponse.NumericRangeResultJ\x04\x08\x01\x10\x02\x1a\xd1\x01\n\x08MetaData\x12G\n\x07metrics\x18\x01 \x01(\x0b\x32\x36.couchbase.search.v1.SearchQueryResponse.SearchMetrics\x12M\n\x06\x65rrors\x18\x02 \x03(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.MetaData.ErrorsEntry\x1a-\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xc8\x01\n\rSearchMetrics\x12\x31\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\ntotal_rows\x18\x02 \x01(\x04\x12\x11\n\tmax_score\x18\x03 \x01(\x01\x12\x1d\n\x15total_partition_count\x18\x04 \x01(\x04\x12\x1f\n\x17success_partition_count\x18\x05 \x01(\x04\x12\x1d\n\x15\x65rror_partition_count\x18\x06 \x01(\x04\x1a\x63\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetResult:\x02\x38\x01\x42\x0c\n\n_meta_data*8\n\x0bKnnOperator\x12\x13\n\x0fKNN_OPERATOR_OR\x10\x00\x12\x14\n\x10KNN_OPERATOR_AND\x10\x01\x32u\n\rSearchService\x12\x64\n\x0bSearchQuery\x12\'.couchbase.search.v1.SearchQueryRequest\x1a(.couchbase.search.v1.SearchQueryResponse\"\x00\x30\x01\x42\xf2\x01\n+com.couchbase.client.protostellar.search.v1P\x01Z@github.com/couchbase/goprotostellar/genproto/search_v1;search_v1\xaa\x02 Couchbase.Protostellar.Search.V1\xca\x02*Couchbase\\Protostellar\\Generated\\Search\\V1\xea\x02.Couchbase::Protostellar::Generated::Search::V1b\x06proto3"
|
|
12
12
|
|
|
13
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
|
17
|
-
rescue TypeError => e
|
|
18
|
-
# Compatibility code: will be removed in the next major version.
|
|
19
|
-
require 'google/protobuf/descriptor_pb'
|
|
20
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
21
|
-
parsed.clear_dependency
|
|
22
|
-
serialized = parsed.class.encode(parsed)
|
|
23
|
-
file = pool.add_serialized_file(serialized)
|
|
24
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
25
|
-
imports = [
|
|
26
|
-
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
27
|
-
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
13
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
15
|
|
|
39
16
|
module Couchbase
|
|
40
17
|
module Protostellar
|
|
@@ -76,6 +53,7 @@ module Couchbase
|
|
|
76
53
|
NumericRangeFacet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.NumericRangeFacet").msgclass
|
|
77
54
|
TermFacet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.TermFacet").msgclass
|
|
78
55
|
Facet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.Facet").msgclass
|
|
56
|
+
KnnQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.KnnQuery").msgclass
|
|
79
57
|
SearchQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest").msgclass
|
|
80
58
|
SearchQueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest.ScanConsistency").enummodule
|
|
81
59
|
SearchQueryRequest::HighlightStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest.HighlightStyle").enummodule
|
|
@@ -92,6 +70,7 @@ module Couchbase
|
|
|
92
70
|
SearchQueryResponse::NumericRangeFacetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResult").msgclass
|
|
93
71
|
SearchQueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.MetaData").msgclass
|
|
94
72
|
SearchQueryResponse::SearchMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.SearchMetrics").msgclass
|
|
73
|
+
KnnOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.KnnOperator").enummodule
|
|
95
74
|
end
|
|
96
75
|
end
|
|
97
76
|
end
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/search/v1/search.proto for package 'Couchbase.Protostellar.Generated.Search.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Search (Full-Text Search) Service
|
|
5
|
+
#
|
|
6
|
+
# Provides full-text search (FTS) queries against Couchbase search indexes.
|
|
7
|
+
# Supports 21 query types, geo queries, KNN vector search, sorting, facets,
|
|
8
|
+
# and highlighting. Results are server-streamed.
|
|
3
9
|
|
|
4
10
|
require 'grpc'
|
|
5
11
|
require 'couchbase/protostellar/generated/search/v1/search_pb'
|
|
@@ -10,6 +16,9 @@ module Couchbase
|
|
|
10
16
|
module Search
|
|
11
17
|
module V1
|
|
12
18
|
module SearchService
|
|
19
|
+
# ---- Service ----
|
|
20
|
+
#
|
|
21
|
+
# SearchService provides full-text search query execution.
|
|
13
22
|
class Service
|
|
14
23
|
|
|
15
24
|
include ::GRPC::GenericService
|
|
@@ -18,6 +27,8 @@ module Couchbase
|
|
|
18
27
|
self.unmarshal_class_method = :decode
|
|
19
28
|
self.service_name = 'couchbase.search.v1.SearchService'
|
|
20
29
|
|
|
30
|
+
# SearchQuery executes a search query against a named index and streams
|
|
31
|
+
# back hits, facet results, and metadata.
|
|
21
32
|
rpc :SearchQuery, ::Couchbase::Protostellar::Generated::Search::V1::SearchQueryRequest, stream(::Couchbase::Protostellar::Generated::Search::V1::SearchQueryResponse)
|
|
22
33
|
end
|
|
23
34
|
|
|
@@ -7,29 +7,8 @@ require 'google/protobuf'
|
|
|
7
7
|
|
|
8
8
|
descriptor_data = "\n,couchbase/transactions/v1/transactions.proto\x12\x19\x63ouchbase.transactions.v1\"e\n\x1eTransactionBeginAttemptRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_transaction_id\"M\n\x1fTransactionBeginAttemptResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\x12\x12\n\nattempt_id\x18\x02 \x01(\t\"[\n\x18TransactionCommitRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\"\x1b\n\x19TransactionCommitResponse\"]\n\x1aTransactionRollbackRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\"\x1d\n\x1bTransactionRollbackResponse\"\x92\x01\n\x15TransactionGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\"4\n\x16TransactionGetResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xa4\x01\n\x18TransactionInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\r\n\x05value\x18\x07 \x01(\x0c\"(\n\x19TransactionInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\"\xb2\x01\n\x19TransactionReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x07 \x01(\x04\x12\r\n\x05value\x18\x08 \x01(\x0c\")\n\x1aTransactionReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\"\xa2\x01\n\x18TransactionRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x07 \x01(\x04\"(\n\x19TransactionRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x32\xbb\x07\n\x13TransactionsService\x12\x92\x01\n\x17TransactionBeginAttempt\x12\x39.couchbase.transactions.v1.TransactionBeginAttemptRequest\x1a:.couchbase.transactions.v1.TransactionBeginAttemptResponse\"\x00\x12\x80\x01\n\x11TransactionCommit\x12\x33.couchbase.transactions.v1.TransactionCommitRequest\x1a\x34.couchbase.transactions.v1.TransactionCommitResponse\"\x00\x12\x86\x01\n\x13TransactionRollback\x12\x35.couchbase.transactions.v1.TransactionRollbackRequest\x1a\x36.couchbase.transactions.v1.TransactionRollbackResponse\"\x00\x12w\n\x0eTransactionGet\x12\x30.couchbase.transactions.v1.TransactionGetRequest\x1a\x31.couchbase.transactions.v1.TransactionGetResponse\"\x00\x12\x80\x01\n\x11TransactionInsert\x12\x33.couchbase.transactions.v1.TransactionInsertRequest\x1a\x34.couchbase.transactions.v1.TransactionInsertResponse\"\x00\x12\x83\x01\n\x12TransactionReplace\x12\x34.couchbase.transactions.v1.TransactionReplaceRequest\x1a\x35.couchbase.transactions.v1.TransactionReplaceResponse\"\x00\x12\x80\x01\n\x11TransactionRemove\x12\x33.couchbase.transactions.v1.TransactionRemoveRequest\x1a\x34.couchbase.transactions.v1.TransactionRemoveResponse\"\x00\x42\x96\x02\n1com.couchbase.client.protostellar.transactions.v1P\x01ZLgithub.com/couchbase/goprotostellar/genproto/transactions_v1;transactions_v1\xaa\x02&Couchbase.Protostellar.Transactions.V1\xca\x02\x30\x43ouchbase\\Protostellar\\Generated\\Transactions\\V1\xea\x02\x34\x43ouchbase::Protostellar::Generated::Transactions::V1b\x06proto3"
|
|
9
9
|
|
|
10
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
-
|
|
12
|
-
begin
|
|
13
|
-
pool.add_serialized_file(descriptor_data)
|
|
14
|
-
rescue TypeError => e
|
|
15
|
-
# Compatibility code: will be removed in the next major version.
|
|
16
|
-
require 'google/protobuf/descriptor_pb'
|
|
17
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
18
|
-
parsed.clear_dependency
|
|
19
|
-
serialized = parsed.class.encode(parsed)
|
|
20
|
-
file = pool.add_serialized_file(serialized)
|
|
21
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
22
|
-
imports = [
|
|
23
|
-
]
|
|
24
|
-
imports.each do |type_name, expected_filename|
|
|
25
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
26
|
-
if import_file.name != expected_filename
|
|
27
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
31
|
-
warn "This will become an error in the next major version."
|
|
32
|
-
end
|
|
10
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
33
12
|
|
|
34
13
|
module Couchbase
|
|
35
14
|
module Protostellar
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/transactions/v1/transactions.proto for package 'Couchbase.Protostellar.Generated.Transactions.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Transactions Service
|
|
5
|
+
#
|
|
6
|
+
# Provides server-managed distributed ACID transactions against a
|
|
7
|
+
# Couchbase cluster. The transaction lifecycle is:
|
|
8
|
+
# 1. BeginAttempt — start a new transaction attempt.
|
|
9
|
+
# 2. Perform data operations (Get, Insert, Replace, Remove) within
|
|
10
|
+
# the transaction context.
|
|
11
|
+
# 3. Commit or Rollback the transaction attempt.
|
|
12
|
+
# Each attempt is identified by a (transaction_id, attempt_id) pair.
|
|
3
13
|
|
|
4
14
|
require 'grpc'
|
|
5
15
|
require 'couchbase/protostellar/generated/transactions/v1/transactions_pb'
|
|
@@ -10,6 +20,9 @@ module Couchbase
|
|
|
10
20
|
module Transactions
|
|
11
21
|
module V1
|
|
12
22
|
module TransactionsService
|
|
23
|
+
# TransactionsService provides distributed ACID transactions.
|
|
24
|
+
# All data operations must reference a valid transaction_id and attempt_id
|
|
25
|
+
# obtained from TransactionBeginAttempt.
|
|
13
26
|
class Service
|
|
14
27
|
|
|
15
28
|
include ::GRPC::GenericService
|
|
@@ -18,12 +31,29 @@ module Couchbase
|
|
|
18
31
|
self.unmarshal_class_method = :decode
|
|
19
32
|
self.service_name = 'couchbase.transactions.v1.TransactionsService'
|
|
20
33
|
|
|
34
|
+
# TransactionBeginAttempt starts a new transaction attempt. Returns
|
|
35
|
+
# a transaction_id and attempt_id to use for all subsequent operations.
|
|
36
|
+
# If transaction_id is provided, this begins a retry attempt for an
|
|
37
|
+
# existing transaction.
|
|
21
38
|
rpc :TransactionBeginAttempt, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionBeginAttemptRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionBeginAttemptResponse
|
|
39
|
+
# TransactionCommit commits all mutations made within the transaction
|
|
40
|
+
# attempt, making them visible to other operations.
|
|
22
41
|
rpc :TransactionCommit, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionCommitRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionCommitResponse
|
|
42
|
+
# TransactionRollback aborts the transaction attempt and discards
|
|
43
|
+
# all uncommitted mutations.
|
|
23
44
|
rpc :TransactionRollback, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRollbackRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRollbackResponse
|
|
45
|
+
# TransactionGet retrieves a document within the transaction context.
|
|
46
|
+
# The returned CAS must be used for subsequent Replace or Remove
|
|
47
|
+
# operations on this document within the same transaction.
|
|
24
48
|
rpc :TransactionGet, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionGetRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionGetResponse
|
|
49
|
+
# TransactionInsert creates a new document within the transaction.
|
|
50
|
+
# Fails if the document already exists.
|
|
25
51
|
rpc :TransactionInsert, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionInsertRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionInsertResponse
|
|
52
|
+
# TransactionReplace replaces an existing document within the transaction.
|
|
53
|
+
# Requires the CAS from a prior TransactionGet.
|
|
26
54
|
rpc :TransactionReplace, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionReplaceRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionReplaceResponse
|
|
55
|
+
# TransactionRemove removes a document within the transaction.
|
|
56
|
+
# Requires the CAS from a prior TransactionGet.
|
|
27
57
|
rpc :TransactionRemove, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRemoveRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRemoveResponse
|
|
28
58
|
end
|
|
29
59
|
|
|
@@ -7,29 +7,8 @@ require 'google/protobuf'
|
|
|
7
7
|
|
|
8
8
|
descriptor_data = "\n\x1c\x63ouchbase/view/v1/view.proto\x12\x11\x63ouchbase.view.v1\"\xa0\t\n\x10ViewQueryRequest\x12\x13\n\x0b\x62ucket_name\x18\x08 \x01(\t\x12\x1c\n\x14\x64\x65sign_document_name\x18\x01 \x01(\t\x12\x11\n\tview_name\x18\x02 \x01(\t\x12\x11\n\x04skip\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x04 \x01(\rH\x01\x88\x01\x01\x12R\n\x10scan_consistency\x18\x05 \x01(\x0e\x32\x33.couchbase.view.v1.ViewQueryRequest.ScanConsistencyH\x02\x88\x01\x01\x12\x13\n\x06reduce\x18\x06 \x01(\x08H\x03\x88\x01\x01\x12\x12\n\x05group\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x18\n\x0bgroup_level\x18\t \x01(\rH\x05\x88\x01\x01\x12\x10\n\x03key\x18\n \x01(\x0cH\x06\x88\x01\x01\x12\x0c\n\x04keys\x18\x0b \x03(\x0c\x12\x16\n\tstart_key\x18\x0c \x01(\x0cH\x07\x88\x01\x01\x12\x14\n\x07\x65nd_key\x18\r \x01(\x0cH\x08\x88\x01\x01\x12\x1a\n\rinclusive_end\x18\x0e \x01(\x08H\t\x88\x01\x01\x12\x1d\n\x10start_key_doc_id\x18\x0f \x01(\tH\n\x88\x01\x01\x12\x1b\n\x0e\x65nd_key_doc_id\x18\x10 \x01(\tH\x0b\x88\x01\x01\x12\x44\n\x08on_error\x18\x11 \x01(\x0e\x32-.couchbase.view.v1.ViewQueryRequest.ErrorModeH\x0c\x88\x01\x01\x12\x12\n\x05\x64\x65\x62ug\x18\x12 \x01(\x08H\r\x88\x01\x01\x12\x45\n\tnamespace\x18\x13 \x01(\x0e\x32-.couchbase.view.v1.ViewQueryRequest.NamespaceH\x0e\x88\x01\x01\x12=\n\x05order\x18\x14 \x01(\x0e\x32).couchbase.view.v1.ViewQueryRequest.OrderH\x0f\x88\x01\x01\"y\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\x12!\n\x1dSCAN_CONSISTENCY_UPDATE_AFTER\x10\x02\"9\n\tErrorMode\x12\x17\n\x13\x45RROR_MODE_CONTINUE\x10\x00\x12\x13\n\x0f\x45RROR_MODE_STOP\x10\x01\"@\n\tNamespace\x12\x18\n\x14NAMESPACE_PRODUCTION\x10\x00\x12\x19\n\x15NAMESPACE_DEVELOPMENT\x10\x01\"2\n\x05Order\x12\x13\n\x0fORDER_ASCENDING\x10\x00\x12\x14\n\x10ORDER_DESCENDING\x10\x01\x42\x07\n\x05_skipB\x08\n\x06_limitB\x13\n\x11_scan_consistencyB\t\n\x07_reduceB\x08\n\x06_groupB\x0e\n\x0c_group_levelB\x06\n\x04_keyB\x0c\n\n_start_keyB\n\n\x08_end_keyB\x10\n\x0e_inclusive_endB\x13\n\x11_start_key_doc_idB\x11\n\x0f_end_key_doc_idB\x0b\n\t_on_errorB\x08\n\x06_debugB\x0c\n\n_namespaceB\x08\n\x06_order\"\xfe\x01\n\x11ViewQueryResponse\x12\x36\n\x04rows\x18\x01 \x03(\x0b\x32(.couchbase.view.v1.ViewQueryResponse.Row\x12\x45\n\tmeta_data\x18\x02 \x01(\x0b\x32-.couchbase.view.v1.ViewQueryResponse.MetaDataH\x00\x88\x01\x01\x1a-\n\x03Row\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x1a-\n\x08MetaData\x12\x12\n\ntotal_rows\x18\x01 \x01(\x04\x12\r\n\x05\x64\x65\x62ug\x18\x02 \x01(\x0c\x42\x0c\n\n_meta_data2i\n\x0bViewService\x12Z\n\tViewQuery\x12#.couchbase.view.v1.ViewQueryRequest\x1a$.couchbase.view.v1.ViewQueryResponse\"\x00\x30\x01\x42\xe6\x01\n)com.couchbase.client.protostellar.view.v1P\x01Z<github.com/couchbase/goprotostellar/genproto/view_v1;view_v1\xaa\x02\x1e\x43ouchbase.Protostellar.View.V1\xca\x02(Couchbase\\Protostellar\\Generated\\View\\V1\xea\x02,Couchbase::Protostellar::Generated::View::V1b\x06proto3"
|
|
9
9
|
|
|
10
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
-
|
|
12
|
-
begin
|
|
13
|
-
pool.add_serialized_file(descriptor_data)
|
|
14
|
-
rescue TypeError => e
|
|
15
|
-
# Compatibility code: will be removed in the next major version.
|
|
16
|
-
require 'google/protobuf/descriptor_pb'
|
|
17
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
18
|
-
parsed.clear_dependency
|
|
19
|
-
serialized = parsed.class.encode(parsed)
|
|
20
|
-
file = pool.add_serialized_file(serialized)
|
|
21
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
22
|
-
imports = [
|
|
23
|
-
]
|
|
24
|
-
imports.each do |type_name, expected_filename|
|
|
25
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
26
|
-
if import_file.name != expected_filename
|
|
27
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
31
|
-
warn "This will become an error in the next major version."
|
|
32
|
-
end
|
|
10
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
33
12
|
|
|
34
13
|
module Couchbase
|
|
35
14
|
module Protostellar
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/view/v1/view.proto for package 'Couchbase.Protostellar.Generated.View.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# View Service
|
|
5
|
+
#
|
|
6
|
+
# Provides MapReduce view query execution against a Couchbase cluster.
|
|
7
|
+
# Views are defined in design documents and produce key-value results
|
|
8
|
+
# via map and optional reduce functions. Results are server-streamed.
|
|
3
9
|
|
|
4
10
|
require 'grpc'
|
|
5
11
|
require 'couchbase/protostellar/generated/view/v1/view_pb'
|
|
@@ -10,6 +16,7 @@ module Couchbase
|
|
|
10
16
|
module View
|
|
11
17
|
module V1
|
|
12
18
|
module ViewService
|
|
19
|
+
# ViewService provides MapReduce view query execution.
|
|
13
20
|
class Service
|
|
14
21
|
|
|
15
22
|
include ::GRPC::GenericService
|
|
@@ -18,6 +25,8 @@ module Couchbase
|
|
|
18
25
|
self.unmarshal_class_method = :decode
|
|
19
26
|
self.service_name = 'couchbase.view.v1.ViewService'
|
|
20
27
|
|
|
28
|
+
# ViewQuery executes a MapReduce view query and streams back result rows
|
|
29
|
+
# and metadata. The final streamed response contains MetaData.
|
|
21
30
|
rpc :ViewQuery, ::Couchbase::Protostellar::Generated::View::V1::ViewQueryRequest, stream(::Couchbase::Protostellar::Generated::View::V1::ViewQueryResponse)
|
|
22
31
|
end
|
|
23
32
|
|
|
@@ -52,11 +52,13 @@ module Couchbase
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def create_collection_request(scope_name, collection_name, settings, options)
|
|
55
|
-
proto_opts = {}
|
|
56
|
-
proto_opts[:max_expiry_secs] = settings.max_expiry unless settings.max_expiry.nil?
|
|
57
55
|
unless settings.history.nil?
|
|
58
56
|
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support the history setting"
|
|
59
57
|
end
|
|
58
|
+
raise Couchbase::Error::InvalidArgument, "max_expiry must be a non-negative integer" if settings.max_expiry&.negative?
|
|
59
|
+
|
|
60
|
+
proto_opts = {}
|
|
61
|
+
proto_opts[:max_expiry_secs] = settings.max_expiry unless settings.max_expiry.nil?
|
|
60
62
|
|
|
61
63
|
proto_req = Generated::Admin::Collection::V1::CreateCollectionRequest.new(
|
|
62
64
|
bucket_name: @bucket_name,
|
|
@@ -41,6 +41,7 @@ module Couchbase
|
|
|
41
41
|
def create_primary_index_request(options, bucket_name = nil)
|
|
42
42
|
proto_opts = {
|
|
43
43
|
deferred: options.deferred,
|
|
44
|
+
ignore_if_exists: options.ignore_if_exists,
|
|
44
45
|
}
|
|
45
46
|
proto_opts[:name] = options.index_name unless options.index_name.nil?
|
|
46
47
|
proto_opts[:num_replicas] = options.num_replicas unless options.num_replicas.nil?
|
|
@@ -58,6 +59,7 @@ module Couchbase
|
|
|
58
59
|
def create_index_request(index_name, fields, options, bucket_name = nil)
|
|
59
60
|
proto_opts = {
|
|
60
61
|
deferred: options.deferred,
|
|
62
|
+
ignore_if_exists: options.ignore_if_exists,
|
|
61
63
|
}
|
|
62
64
|
proto_opts[:num_replicas] = options.num_replicas unless options.num_replicas.nil?
|
|
63
65
|
|
|
@@ -110,7 +110,7 @@ module Couchbase
|
|
|
110
110
|
proto_req = Generated::KV::V1::GetAndLockRequest.new(
|
|
111
111
|
**location,
|
|
112
112
|
key: id,
|
|
113
|
-
|
|
113
|
+
lock_time_secs: lock_time.respond_to?(:in_seconds) ? lock_time.in_seconds : lock_time,
|
|
114
114
|
)
|
|
115
115
|
|
|
116
116
|
create_kv_request(proto_req, :get_and_lock, options)
|
|
@@ -52,6 +52,10 @@ module Couchbase
|
|
|
52
52
|
def search(...)
|
|
53
53
|
raise Error::FeatureNotAvailable, "scope search not supported in #{Protostellar::NAME} mode"
|
|
54
54
|
end
|
|
55
|
+
|
|
56
|
+
def search_indexes(...)
|
|
57
|
+
raise Error::FeatureNotAvailable, "scope search indexes not supported in #{Protostellar::NAME} mode"
|
|
58
|
+
end
|
|
55
59
|
end
|
|
56
60
|
end
|
|
57
61
|
end
|