couchbase 4.2.9 → 4.2.11-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/deps/couchbase-cxx-client/CMakeLists.txt +4 -0
  2. package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +7 -3
  3. package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +1 -0
  4. package/deps/couchbase-cxx-client/core/bucket.cxx +67 -2
  5. package/deps/couchbase-cxx-client/core/bucket.hxx +2 -1
  6. package/deps/couchbase-cxx-client/core/cluster.cxx +65 -1
  7. package/deps/couchbase-cxx-client/core/impl/bucket.cxx +24 -0
  8. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +73 -0
  9. package/deps/couchbase-cxx-client/core/impl/collection.cxx +2 -2
  10. package/deps/couchbase-cxx-client/core/impl/diagnostics.cxx +294 -0
  11. package/deps/couchbase-cxx-client/core/impl/diagnostics.hxx +39 -0
  12. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
  13. package/deps/couchbase-cxx-client/core/impl/scope.cxx +19 -4
  14. package/deps/couchbase-cxx-client/core/impl/search.cxx +75 -2
  15. package/deps/couchbase-cxx-client/core/impl/search.hxx +8 -0
  16. package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +261 -18
  17. package/deps/couchbase-cxx-client/core/impl/search_request.cxx +139 -0
  18. package/deps/couchbase-cxx-client/core/impl/vector_query.cxx +42 -0
  19. package/deps/couchbase-cxx-client/core/impl/vector_search.cxx +40 -0
  20. package/deps/couchbase-cxx-client/core/io/http_session.hxx +6 -3
  21. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +7 -1
  22. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +10 -0
  23. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +48 -33
  24. package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +2 -0
  25. package/deps/couchbase-cxx-client/core/logger/logger.cxx +1 -1
  26. package/deps/couchbase-cxx-client/core/management/design_document.hxx +1 -1
  27. package/deps/couchbase-cxx-client/core/meta/features.hxx +26 -1
  28. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +1 -1
  29. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +1 -1
  30. package/deps/couchbase-cxx-client/core/operations/document_query.cxx +8 -3
  31. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +37 -1
  32. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +11 -0
  33. package/deps/couchbase-cxx-client/core/operations/document_view.cxx +3 -0
  34. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  35. package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +7 -6
  36. package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +1 -1
  37. package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +7 -8
  38. package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +1 -1
  39. package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +3 -0
  40. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +24 -13
  41. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -1
  42. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +17 -1
  43. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +3 -0
  44. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +21 -1
  45. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +3 -0
  46. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +21 -1
  47. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +3 -0
  48. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +21 -1
  49. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +3 -0
  50. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +17 -1
  51. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +3 -0
  52. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +17 -1
  53. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +2 -0
  54. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +39 -22
  55. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +3 -0
  56. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +18 -1
  57. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +3 -0
  58. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +17 -1
  59. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +3 -0
  60. package/deps/couchbase-cxx-client/core/origin.cxx +14 -0
  61. package/deps/couchbase-cxx-client/core/origin.hxx +6 -0
  62. package/deps/couchbase-cxx-client/core/protocol/status.cxx +2 -0
  63. package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
  64. package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +70 -1
  65. package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +30 -2
  66. package/deps/couchbase-cxx-client/core/topology/collections_manifest.hxx +1 -1
  67. package/deps/couchbase-cxx-client/core/topology/collections_manifest_json.hxx +1 -1
  68. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +1 -34
  69. package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +2 -2
  70. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +43 -20
  71. package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal.hxx +5 -0
  72. package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +4 -0
  73. package/deps/couchbase-cxx-client/core/vector_query_combination.hxx +23 -0
  74. package/deps/couchbase-cxx-client/couchbase/bucket.hxx +29 -0
  75. package/deps/couchbase-cxx-client/couchbase/cluster.hxx +110 -0
  76. package/deps/couchbase-cxx-client/couchbase/codec/json_transcoder.hxx +1 -1
  77. package/deps/couchbase-cxx-client/couchbase/codec/raw_binary_transcoder.hxx +2 -1
  78. package/deps/couchbase-cxx-client/couchbase/codec/raw_json_transcoder.hxx +78 -0
  79. package/deps/couchbase-cxx-client/couchbase/codec/raw_string_transcoder.hxx +72 -0
  80. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +80 -11
  81. package/deps/couchbase-cxx-client/couchbase/create_collection_options.hxx +29 -1
  82. package/deps/couchbase-cxx-client/couchbase/diagnostics_options.hxx +75 -0
  83. package/deps/couchbase-cxx-client/couchbase/diagnostics_result.hxx +124 -0
  84. package/deps/couchbase-cxx-client/couchbase/endpoint_diagnostics.hxx +206 -0
  85. package/deps/couchbase-cxx-client/couchbase/endpoint_ping_report.hxx +205 -0
  86. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -1
  87. package/deps/couchbase-cxx-client/couchbase/get_options.hxx +1 -6
  88. package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
  89. package/deps/couchbase-cxx-client/couchbase/management/collection_spec.hxx +1 -1
  90. package/deps/couchbase-cxx-client/couchbase/ping_options.hxx +93 -0
  91. package/deps/couchbase-cxx-client/couchbase/ping_result.hxx +118 -0
  92. package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +6 -8
  93. package/deps/couchbase-cxx-client/couchbase/scope.hxx +24 -8
  94. package/deps/couchbase-cxx-client/couchbase/scope_search_index_manager.hxx +291 -0
  95. package/deps/couchbase-cxx-client/couchbase/search_request.hxx +120 -0
  96. package/deps/couchbase-cxx-client/couchbase/service_type.hxx +58 -0
  97. package/deps/couchbase-cxx-client/couchbase/update_collection_options.hxx +32 -3
  98. package/deps/couchbase-cxx-client/couchbase/vector_query.hxx +99 -0
  99. package/deps/couchbase-cxx-client/couchbase/vector_search.hxx +85 -0
  100. package/deps/couchbase-cxx-client/couchbase/vector_search_options.hxx +76 -0
  101. package/dist/binding.d.ts +33 -2
  102. package/dist/binding.js +4 -1
  103. package/dist/bindingutilities.d.ts +16 -3
  104. package/dist/bindingutilities.js +47 -7
  105. package/dist/cluster.d.ts +12 -1
  106. package/dist/cluster.js +22 -0
  107. package/dist/couchbase.d.ts +2 -0
  108. package/dist/couchbase.js +2 -0
  109. package/dist/queryindexmanager.d.ts +4 -4
  110. package/dist/queryindexmanager.js +7 -7
  111. package/dist/scope.d.ts +21 -0
  112. package/dist/scope.js +34 -0
  113. package/dist/scopesearchindexmanager.d.ts +116 -0
  114. package/dist/scopesearchindexmanager.js +406 -0
  115. package/dist/sdspecs.js +10 -9
  116. package/dist/sdutils.d.ts +1 -0
  117. package/dist/sdutils.js +4 -0
  118. package/dist/searchexecutor.d.ts +5 -3
  119. package/dist/searchexecutor.js +27 -4
  120. package/dist/searchindexmanager.d.ts +58 -3
  121. package/dist/searchindexmanager.js +188 -104
  122. package/dist/searchtypes.d.ts +46 -0
  123. package/dist/searchtypes.js +81 -1
  124. package/dist/vectorsearch.d.ts +99 -0
  125. package/dist/vectorsearch.js +132 -0
  126. package/dist/viewexecutor.js +13 -9
  127. package/dist/viewindexmanager.d.ts +70 -7
  128. package/dist/viewindexmanager.js +236 -103
  129. package/dist/viewtypes.d.ts +26 -0
  130. package/dist/viewtypes.js +17 -1
  131. package/package.json +7 -7
  132. package/src/constants.cpp +12 -0
  133. package/src/jstocbpp_autogen.hpp +113 -13
  134. package/tools/gen-bindings-json.py +2 -0
@@ -0,0 +1,85 @@
1
+ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright 2023-Present Couchbase, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #pragma once
19
+
20
+ #include <couchbase/vector_query.hxx>
21
+ #include <couchbase/vector_search_options.hxx>
22
+
23
+ namespace couchbase
24
+ {
25
+ /**
26
+ * A vector_search allows one or more @ref vector_query to be executed.
27
+ *
28
+ * @since 1.0.0
29
+ * @volatile
30
+ */
31
+ class vector_search
32
+ {
33
+ public:
34
+ /**
35
+ * Will execute all of the provided vector_queries, using the specified options
36
+ *
37
+ * @param vector_queries vector queries to be run
38
+ * @param options options to use on the vector queries
39
+ *
40
+ * @since 1.0.0
41
+ * @volatile
42
+ */
43
+ explicit vector_search(std::vector<vector_query> vector_queries, vector_search_options options = {})
44
+ : vector_queries_{ std::move(vector_queries) }
45
+ , options_{ options.build() }
46
+ {
47
+ }
48
+
49
+ /**
50
+ * Will execute a singe vector_query, using default options
51
+ *
52
+ * @param query the query to be run
53
+ *
54
+ * @since 1.0.0
55
+ * @volatile
56
+ */
57
+ explicit vector_search(vector_query query)
58
+ : vector_queries_{ std::vector<vector_query>{ std::move(query) } }
59
+ {
60
+ }
61
+
62
+ /**
63
+ * Fetches the vector_search_options
64
+ *
65
+ * @since 1.0.0
66
+ * @internal
67
+ */
68
+ [[nodiscard]] vector_search_options::built options() const
69
+ {
70
+ return options_;
71
+ }
72
+
73
+ /**
74
+ * @return encoded representation of the vector_search.
75
+ *
76
+ * @since 1.0.0
77
+ * @internal
78
+ */
79
+ [[nodiscard]] auto encode() const -> encoded_search_query;
80
+
81
+ private:
82
+ std::vector<vector_query> vector_queries_;
83
+ vector_search_options::built options_{};
84
+ };
85
+ } // namespace couchbase
@@ -0,0 +1,76 @@
1
+ /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright 2023-Present Couchbase, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #pragma once
19
+
20
+ namespace couchbase
21
+ {
22
+ enum class vector_query_combination { combination_and, combination_or };
23
+
24
+ /**
25
+ * Options related to executing a @ref vector_search
26
+ *
27
+ * @since 1.0.0
28
+ * @volatile
29
+ */
30
+ struct vector_search_options {
31
+
32
+ /**
33
+ * Immutable value object representing consistent options
34
+ *
35
+ * @since 1.0.0
36
+ * @internal
37
+ */
38
+ struct built {
39
+ std::optional<vector_query_combination> combination;
40
+ };
41
+
42
+ /**
43
+ * Validates options and returns them as an immutable value.
44
+ *
45
+ * @return consistent options as an immutable value
46
+ *
47
+ * @exception std::system_error with code errc::common::invalid_argument if the options are not valid
48
+ *
49
+ * @since 1.0.0
50
+ * @internal
51
+ */
52
+ [[nodiscard]] auto build() const -> built
53
+ {
54
+ return { combination_ };
55
+ }
56
+
57
+ /**
58
+ * Sets how the vector query results are combined.
59
+ *
60
+ * @param combination @ref vector_query_combination
61
+ * @return this for chaining purposes
62
+ *
63
+ * @since 1.0.0
64
+ * @volatile
65
+ *
66
+ */
67
+ auto query_combination(vector_query_combination combination) -> vector_search_options&
68
+ {
69
+ combination_ = combination;
70
+ return *this;
71
+ }
72
+
73
+ private:
74
+ std::optional<vector_query_combination> combination_{};
75
+ };
76
+ } // namespace couchbase
package/dist/binding.d.ts CHANGED
@@ -131,6 +131,8 @@ export declare enum CppPersistTo {
131
131
  }
132
132
  export declare enum CppReplicateTo {
133
133
  }
134
+ export declare enum CppVectorQueryCombination {
135
+ }
134
136
  export interface CppManagementAnalyticsDataset {
135
137
  name: string;
136
138
  dataverse_name: string;
@@ -206,7 +208,7 @@ export interface CppManagementClusterBucketSettingsNode {
206
208
  };
207
209
  }
208
210
  export interface CppManagementViewsDesignDocument {
209
- rev: string;
211
+ rev?: string;
210
212
  name: string;
211
213
  ns: CppDesignDocumentNamespace;
212
214
  views: {
@@ -858,6 +860,11 @@ export interface CppSearchResponseSearchFacetNumericRangeFacet {
858
860
  export interface CppSearchRequest {
859
861
  index_name: string;
860
862
  query: CppJsonString;
863
+ bucket_name?: string;
864
+ scope_name?: string;
865
+ show_request?: boolean;
866
+ vector_search?: CppJsonString;
867
+ vector_query_combination?: CppVectorQueryCombination;
861
868
  limit?: number;
862
869
  skip?: number;
863
870
  explain?: boolean;
@@ -952,6 +959,7 @@ export interface CppDocumentViewRequest {
952
959
  raw: {
953
960
  [key: string]: string;
954
961
  };
962
+ full_set?: boolean;
955
963
  order?: CppViewSortOrder;
956
964
  on_error?: CppViewOnError;
957
965
  query_string: string[];
@@ -1196,6 +1204,8 @@ export interface CppManagementSearchIndexGetAllResponse {
1196
1204
  indexes: CppManagementSearchIndex[];
1197
1205
  }
1198
1206
  export interface CppManagementSearchIndexGetAllRequest {
1207
+ bucket_name?: string;
1208
+ scope_name?: string;
1199
1209
  client_context_id?: string;
1200
1210
  timeout?: CppMilliseconds;
1201
1211
  }
@@ -1207,6 +1217,8 @@ export interface CppManagementSearchIndexAnalyzeDocumentResponse {
1207
1217
  export interface CppManagementSearchIndexAnalyzeDocumentRequest {
1208
1218
  index_name: string;
1209
1219
  encoded_document: string;
1220
+ bucket_name?: string;
1221
+ scope_name?: string;
1210
1222
  client_context_id?: string;
1211
1223
  timeout?: CppMilliseconds;
1212
1224
  }
@@ -1274,7 +1286,7 @@ export interface CppManagementQueryIndexCreateRequest {
1274
1286
  scope_name: string;
1275
1287
  collection_name: string;
1276
1288
  index_name: string;
1277
- fields: string[];
1289
+ keys: string[];
1278
1290
  query_ctx: CppQueryContext;
1279
1291
  is_primary: boolean;
1280
1292
  ignore_if_exists: boolean;
@@ -1292,6 +1304,8 @@ export interface CppManagementSearchIndexUpsertResponse {
1292
1304
  }
1293
1305
  export interface CppManagementSearchIndexUpsertRequest {
1294
1306
  index: CppManagementSearchIndex;
1307
+ bucket_name?: string;
1308
+ scope_name?: string;
1295
1309
  client_context_id?: string;
1296
1310
  timeout?: CppMilliseconds;
1297
1311
  }
@@ -1614,6 +1628,8 @@ export interface CppManagementSearchIndexDropResponse {
1614
1628
  }
1615
1629
  export interface CppManagementSearchIndexDropRequest {
1616
1630
  index_name: string;
1631
+ bucket_name?: string;
1632
+ scope_name?: string;
1617
1633
  client_context_id?: string;
1618
1634
  timeout?: CppMilliseconds;
1619
1635
  }
@@ -1624,6 +1640,8 @@ export interface CppManagementSearchIndexControlPlanFreezeResponse {
1624
1640
  export interface CppManagementSearchIndexControlPlanFreezeRequest {
1625
1641
  index_name: string;
1626
1642
  freeze: boolean;
1643
+ bucket_name?: string;
1644
+ scope_name?: string;
1627
1645
  client_context_id?: string;
1628
1646
  timeout?: CppMilliseconds;
1629
1647
  }
@@ -1659,6 +1677,8 @@ export interface CppManagementSearchIndexControlQueryResponse {
1659
1677
  export interface CppManagementSearchIndexControlQueryRequest {
1660
1678
  index_name: string;
1661
1679
  allow: boolean;
1680
+ bucket_name?: string;
1681
+ scope_name?: string;
1662
1682
  client_context_id?: string;
1663
1683
  timeout?: CppMilliseconds;
1664
1684
  }
@@ -1713,6 +1733,8 @@ export interface CppManagementSearchIndexControlIngestResponse {
1713
1733
  export interface CppManagementSearchIndexControlIngestRequest {
1714
1734
  index_name: string;
1715
1735
  pause: boolean;
1736
+ bucket_name?: string;
1737
+ scope_name?: string;
1716
1738
  client_context_id?: string;
1717
1739
  timeout?: CppMilliseconds;
1718
1740
  }
@@ -1775,6 +1797,8 @@ export interface CppManagementSearchIndexGetResponse {
1775
1797
  }
1776
1798
  export interface CppManagementSearchIndexGetRequest {
1777
1799
  index_name: string;
1800
+ bucket_name?: string;
1801
+ scope_name?: string;
1778
1802
  client_context_id?: string;
1779
1803
  timeout?: CppMilliseconds;
1780
1804
  }
@@ -1822,6 +1846,8 @@ export interface CppManagementSearchIndexGetDocumentsCountResponse {
1822
1846
  }
1823
1847
  export interface CppManagementSearchIndexGetDocumentsCountRequest {
1824
1848
  index_name: string;
1849
+ bucket_name?: string;
1850
+ scope_name?: string;
1825
1851
  client_context_id?: string;
1826
1852
  timeout?: CppMilliseconds;
1827
1853
  }
@@ -2362,6 +2388,7 @@ export interface CppBindingAutogen {
2362
2388
  opaque_no_match: CppKeyValueStatusCode;
2363
2389
  locked: CppKeyValueStatusCode;
2364
2390
  not_locked: CppKeyValueStatusCode;
2391
+ config_only: CppKeyValueStatusCode;
2365
2392
  auth_stale: CppKeyValueStatusCode;
2366
2393
  auth_error: CppKeyValueStatusCode;
2367
2394
  auth_continue: CppKeyValueStatusCode;
@@ -2461,6 +2488,10 @@ export interface CppBindingAutogen {
2461
2488
  two: CppReplicateTo;
2462
2489
  three: CppReplicateTo;
2463
2490
  };
2491
+ vector_query_combination: {
2492
+ combination_and: CppVectorQueryCombination;
2493
+ combination_or: CppVectorQueryCombination;
2494
+ };
2464
2495
  }
2465
2496
  export type CppErrc = CppErrcCommon | CppErrcKeyValue | CppErrcQuery | CppErrcAnalytics | CppErrcSearch | CppErrcView | CppErrcManagement | CppErrcFieldLevelEncryption | CppErrcNetwork;
2466
2497
  export declare enum CppTxnFailureType {
package/dist/binding.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CppTxnExternalException = exports.CppTxnFailureType = exports.CppReplicateTo = exports.CppPersistTo = exports.CppStoreSemantics = exports.CppImplSubdocOpcode = exports.CppKeyValueStatusCode = exports.CppErrcNetwork = exports.CppErrcFieldLevelEncryption = exports.CppErrcManagement = exports.CppErrcView = exports.CppErrcSearch = exports.CppErrcAnalytics = exports.CppErrcQuery = exports.CppErrcKeyValue = exports.CppErrcCommon = exports.CppDurabilityLevel = exports.CppAnalyticsResponseAnalyticsStatus = exports.CppViewSortOrder = exports.CppViewScanConsistency = exports.CppViewOnError = exports.CppServiceType = exports.CppSearchScanConsistency = exports.CppSearchHighlightStyle = exports.CppQueryScanConsistency = exports.CppQueryProfile = exports.CppDiagPingState = exports.CppDiagEndpointState = exports.CppDiagClusterState = exports.CppDesignDocumentNamespace = exports.CppAnalyticsScanConsistency = exports.CppProtocolSubdocOpcode = exports.CppRetryReason = exports.CppManagementRbacAuthDomain = exports.CppManagementEventingFunctionProcessingStatus = exports.CppManagementEventingFunctionDeploymentStatus = exports.CppManagementEventingFunctionStatus = exports.CppManagementEventingFunctionBucketAccess = exports.CppManagementEventingFunctionLogLevel = exports.CppManagementEventingFunctionLanguageCompatibility = exports.CppManagementEventingFunctionDcpBoundary = exports.CppManagementClusterBucketStorageBackend = exports.CppManagementClusterBucketConflictResolution = exports.CppManagementClusterBucketEvictionPolicy = exports.CppManagementClusterBucketCompression = exports.CppManagementClusterBucketType = exports.CppManagementAnalyticsCouchbaseLinkEncryptionLevel = exports.zeroCas = void 0;
6
+ exports.CppTxnExternalException = exports.CppTxnFailureType = exports.CppVectorQueryCombination = exports.CppReplicateTo = exports.CppPersistTo = exports.CppStoreSemantics = exports.CppImplSubdocOpcode = exports.CppKeyValueStatusCode = exports.CppErrcNetwork = exports.CppErrcFieldLevelEncryption = exports.CppErrcManagement = exports.CppErrcView = exports.CppErrcSearch = exports.CppErrcAnalytics = exports.CppErrcQuery = exports.CppErrcKeyValue = exports.CppErrcCommon = exports.CppDurabilityLevel = exports.CppAnalyticsResponseAnalyticsStatus = exports.CppViewSortOrder = exports.CppViewScanConsistency = exports.CppViewOnError = exports.CppServiceType = exports.CppSearchScanConsistency = exports.CppSearchHighlightStyle = exports.CppQueryScanConsistency = exports.CppQueryProfile = exports.CppDiagPingState = exports.CppDiagEndpointState = exports.CppDiagClusterState = exports.CppDesignDocumentNamespace = exports.CppAnalyticsScanConsistency = exports.CppProtocolSubdocOpcode = exports.CppRetryReason = exports.CppManagementRbacAuthDomain = exports.CppManagementEventingFunctionProcessingStatus = exports.CppManagementEventingFunctionDeploymentStatus = exports.CppManagementEventingFunctionStatus = exports.CppManagementEventingFunctionBucketAccess = exports.CppManagementEventingFunctionLogLevel = exports.CppManagementEventingFunctionLanguageCompatibility = exports.CppManagementEventingFunctionDcpBoundary = exports.CppManagementClusterBucketStorageBackend = exports.CppManagementClusterBucketConflictResolution = exports.CppManagementClusterBucketEvictionPolicy = exports.CppManagementClusterBucketCompression = exports.CppManagementClusterBucketType = exports.CppManagementAnalyticsCouchbaseLinkEncryptionLevel = exports.zeroCas = void 0;
7
7
  /*
8
8
  eslint
9
9
  jsdoc/require-jsdoc: off,
@@ -147,6 +147,9 @@ var CppPersistTo;
147
147
  var CppReplicateTo;
148
148
  (function (CppReplicateTo) {
149
149
  })(CppReplicateTo || (exports.CppReplicateTo = CppReplicateTo = {}));
150
+ var CppVectorQueryCombination;
151
+ (function (CppVectorQueryCombination) {
152
+ })(CppVectorQueryCombination || (exports.CppVectorQueryCombination = CppVectorQueryCombination = {}));
150
153
  var CppTxnFailureType;
151
154
  (function (CppTxnFailureType) {
152
155
  })(CppTxnFailureType || (exports.CppTxnFailureType = CppTxnFailureType = {}));
@@ -1,5 +1,5 @@
1
1
  import { AnalyticsScanConsistency, AnalyticsStatus } from './analyticstypes';
2
- import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppViewScanConsistency, CppViewSortOrder } from './binding';
2
+ import { CppAnalyticsResponseAnalyticsStatus, CppAnalyticsScanConsistency, CppDesignDocumentNamespace, CppDiagEndpointState, CppDiagPingState, CppDurabilityLevel, CppError, CppManagementClusterBucketCompression, CppManagementClusterBucketConflictResolution, CppManagementClusterBucketEvictionPolicy, CppManagementClusterBucketStorageBackend, CppManagementClusterBucketType, CppMutationState, CppPersistTo, CppPrefixScan, CppQueryProfile, CppQueryScanConsistency, CppRangeScan, CppReplicateTo, CppSamplingScan, CppSearchHighlightStyle, CppSearchScanConsistency, CppServiceType, CppStoreSemantics, CppTxnExternalException, CppTxnOpException, CppVectorQueryCombination, CppViewScanConsistency, CppViewSortOrder } from './binding';
3
3
  import { BucketType, CompressionMode, ConflictResolutionType, EvictionPolicy, StorageBackend } from './bucketmanager';
4
4
  import { EndpointState, PingState } from './diagnosticstypes';
5
5
  import { ErrorContext } from './errorcontexts';
@@ -8,7 +8,8 @@ import { MutationState } from './mutationstate';
8
8
  import { QueryProfileMode, QueryScanConsistency } from './querytypes';
9
9
  import { PrefixScan, RangeScan, SamplingScan } from './rangeScan';
10
10
  import { HighlightStyle, SearchScanConsistency } from './searchtypes';
11
- import { ViewOrdering, ViewScanConsistency } from './viewtypes';
11
+ import { VectorQueryCombination } from './vectorsearch';
12
+ import { DesignDocumentNamespace, ViewOrdering, ViewScanConsistency } from './viewtypes';
12
13
  /**
13
14
  * @internal
14
15
  */
@@ -36,7 +37,7 @@ export declare function viewScanConsistencyToCpp(mode: ViewScanConsistency | und
36
37
  /**
37
38
  * @internal
38
39
  */
39
- export declare function viewOrderingToCpp(mode: ViewOrdering | undefined): CppViewSortOrder | undefined;
40
+ export declare function viewOrderingToCpp(ordering: ViewOrdering | undefined): CppViewSortOrder | undefined;
40
41
  /**
41
42
  * @internal
42
43
  */
@@ -141,3 +142,15 @@ export declare function bucketConflictResolutionTypeToCpp(type: ConflictResoluti
141
142
  * @internal
142
143
  */
143
144
  export declare function bucketConflictResolutionTypeFromCpp(type: CppManagementClusterBucketConflictResolution): ConflictResolutionType | undefined;
145
+ /**
146
+ * @internal
147
+ */
148
+ export declare function vectorQueryCombinationToCpp(combination: VectorQueryCombination | undefined): CppVectorQueryCombination;
149
+ /**
150
+ * @internal
151
+ */
152
+ export declare function designDocumentNamespaceFromCpp(namespace: CppDesignDocumentNamespace): DesignDocumentNamespace;
153
+ /**
154
+ * @internal
155
+ */
156
+ export declare function designDocumentNamespaceToCpp(namespace: DesignDocumentNamespace): CppDesignDocumentNamespace;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.bucketConflictResolutionTypeFromCpp = exports.bucketConflictResolutionTypeToCpp = exports.bucketStorageBackendFromCpp = exports.bucketStorageBackendToCpp = exports.bucketEvictionPolicyFromCpp = exports.bucketEvictionPolicyToCpp = exports.bucketCompressionModeFromCpp = exports.bucketCompressionModeToCpp = exports.bucketTypeFromCpp = exports.bucketTypeToCpp = exports.scanTypeToCpp = exports.errorFromCpp = exports.contextFromCpp = exports.pingStateFromCpp = exports.txnOpExeptionFromCpp = exports.txnExternalExceptionStringFromCpp = exports.endpointStateFromCpp = exports.serviceTypeFromCpp = exports.serviceTypeToCpp = exports.mutationStateToCpp = exports.searchHighlightStyleToCpp = exports.searchScanConsistencyToCpp = exports.analyticsStatusFromCpp = exports.analyticsScanConsistencyToCpp = exports.queryProfileToCpp = exports.queryScanConsistencyToCpp = exports.viewOrderingToCpp = exports.viewScanConsistencyToCpp = exports.storeSemanticToCpp = exports.replicateToToCpp = exports.persistToToCpp = exports.durabilityFromCpp = exports.durabilityToCpp = void 0;
29
+ exports.designDocumentNamespaceToCpp = exports.designDocumentNamespaceFromCpp = exports.vectorQueryCombinationToCpp = exports.bucketConflictResolutionTypeFromCpp = exports.bucketConflictResolutionTypeToCpp = exports.bucketStorageBackendFromCpp = exports.bucketStorageBackendToCpp = exports.bucketEvictionPolicyFromCpp = exports.bucketEvictionPolicyToCpp = exports.bucketCompressionModeFromCpp = exports.bucketCompressionModeToCpp = exports.bucketTypeFromCpp = exports.bucketTypeToCpp = exports.scanTypeToCpp = exports.errorFromCpp = exports.contextFromCpp = exports.pingStateFromCpp = exports.txnOpExeptionFromCpp = exports.txnExternalExceptionStringFromCpp = exports.endpointStateFromCpp = exports.serviceTypeFromCpp = exports.serviceTypeToCpp = exports.mutationStateToCpp = exports.searchHighlightStyleToCpp = exports.searchScanConsistencyToCpp = exports.analyticsStatusFromCpp = exports.analyticsScanConsistencyToCpp = exports.queryProfileToCpp = exports.queryScanConsistencyToCpp = exports.viewOrderingToCpp = exports.viewScanConsistencyToCpp = exports.storeSemanticToCpp = exports.replicateToToCpp = exports.persistToToCpp = exports.durabilityFromCpp = exports.durabilityToCpp = void 0;
30
30
  const analyticstypes_1 = require("./analyticstypes");
31
31
  const binding_1 = __importDefault(require("./binding"));
32
32
  const bucketmanager_1 = require("./bucketmanager");
@@ -38,6 +38,7 @@ const querytypes_1 = require("./querytypes");
38
38
  const rangeScan_1 = require("./rangeScan");
39
39
  const searchtypes_1 = require("./searchtypes");
40
40
  const utilities_1 = require("./utilities");
41
+ const vectorsearch_1 = require("./vectorsearch");
41
42
  const viewtypes_1 = require("./viewtypes");
42
43
  /**
43
44
  * @internal
@@ -181,18 +182,18 @@ exports.viewScanConsistencyToCpp = viewScanConsistencyToCpp;
181
182
  /**
182
183
  * @internal
183
184
  */
184
- function viewOrderingToCpp(mode) {
185
- // Unspecified is allowed, and means no sync durability.
186
- if (mode === null || mode === undefined) {
185
+ function viewOrderingToCpp(ordering) {
186
+ // Unspecified is allowed, and means default ordering.
187
+ if (ordering === null || ordering === undefined) {
187
188
  return undefined;
188
189
  }
189
- if (mode === viewtypes_1.ViewOrdering.Ascending) {
190
+ if (ordering === viewtypes_1.ViewOrdering.Ascending) {
190
191
  return binding_1.default.view_sort_order.ascending;
191
192
  }
192
- else if (mode === viewtypes_1.ViewOrdering.Descending) {
193
+ else if (ordering === viewtypes_1.ViewOrdering.Descending) {
193
194
  return binding_1.default.view_sort_order.descending;
194
195
  }
195
- throw new errs.InvalidArgumentError();
196
+ throw new errs.InvalidArgumentError(new Error('Unrecognized view ordering.'));
196
197
  }
197
198
  exports.viewOrderingToCpp = viewOrderingToCpp;
198
199
  /**
@@ -1011,3 +1012,42 @@ function bucketConflictResolutionTypeFromCpp(type) {
1011
1012
  throw new errs.InvalidArgumentError();
1012
1013
  }
1013
1014
  exports.bucketConflictResolutionTypeFromCpp = bucketConflictResolutionTypeFromCpp;
1015
+ /**
1016
+ * @internal
1017
+ */
1018
+ function vectorQueryCombinationToCpp(combination) {
1019
+ if (combination === vectorsearch_1.VectorQueryCombination.AND) {
1020
+ return binding_1.default.vector_query_combination.combination_and;
1021
+ }
1022
+ else if (combination === vectorsearch_1.VectorQueryCombination.OR) {
1023
+ return binding_1.default.vector_query_combination.combination_or;
1024
+ }
1025
+ throw new errs.InvalidArgumentError(new Error('Unrecognized VectorQueryCombination.'));
1026
+ }
1027
+ exports.vectorQueryCombinationToCpp = vectorQueryCombinationToCpp;
1028
+ /**
1029
+ * @internal
1030
+ */
1031
+ function designDocumentNamespaceFromCpp(namespace) {
1032
+ if (namespace === binding_1.default.design_document_namespace.production) {
1033
+ return viewtypes_1.DesignDocumentNamespace.Production;
1034
+ }
1035
+ else if (namespace === binding_1.default.design_document_namespace.development) {
1036
+ return viewtypes_1.DesignDocumentNamespace.Development;
1037
+ }
1038
+ throw new errs.InvalidArgumentError(new Error('Unrecognized DesignDocumentNamespace.'));
1039
+ }
1040
+ exports.designDocumentNamespaceFromCpp = designDocumentNamespaceFromCpp;
1041
+ /**
1042
+ * @internal
1043
+ */
1044
+ function designDocumentNamespaceToCpp(namespace) {
1045
+ if (namespace === viewtypes_1.DesignDocumentNamespace.Production) {
1046
+ return binding_1.default.design_document_namespace.production;
1047
+ }
1048
+ else if (namespace === viewtypes_1.DesignDocumentNamespace.Development) {
1049
+ return binding_1.default.design_document_namespace.development;
1050
+ }
1051
+ throw new errs.InvalidArgumentError(new Error('Unrecognized DesignDocumentNamespace.'));
1052
+ }
1053
+ exports.designDocumentNamespaceToCpp = designDocumentNamespaceToCpp;
package/dist/cluster.d.ts CHANGED
@@ -10,7 +10,7 @@ import { QueryIndexManager } from './queryindexmanager';
10
10
  import { QueryMetaData, QueryOptions, QueryResult } from './querytypes';
11
11
  import { SearchIndexManager } from './searchindexmanager';
12
12
  import { SearchQuery } from './searchquery';
13
- import { SearchMetaData, SearchQueryOptions, SearchResult, SearchRow } from './searchtypes';
13
+ import { SearchMetaData, SearchQueryOptions, SearchRequest, SearchResult, SearchRow } from './searchtypes';
14
14
  import { StreamableRowPromise } from './streamablepromises';
15
15
  import { Transactions, TransactionsConfig } from './transactions';
16
16
  import { Transcoder } from './transcoders';
@@ -300,6 +300,17 @@ export declare class Cluster {
300
300
  * @param callback A node-style callback to be invoked after execution.
301
301
  */
302
302
  searchQuery(indexName: string, query: SearchQuery, options?: SearchQueryOptions, callback?: NodeCallback<SearchResult>): StreamableRowPromise<SearchResult, SearchRow, SearchMetaData>;
303
+ /**
304
+ * Executes a search query against the cluster.
305
+ *
306
+ * Volatile: This API is subject to change at any time.
307
+ *
308
+ * @param indexName The name of the index to query.
309
+ * @param request The SearchRequest describing the search to execute.
310
+ * @param options Optional parameters for this operation.
311
+ * @param callback A node-style callback to be invoked after execution.
312
+ */
313
+ search(indexName: string, request: SearchRequest, options?: SearchQueryOptions, callback?: NodeCallback<SearchResult>): StreamableRowPromise<SearchResult, SearchRow, SearchMetaData>;
303
314
  /**
304
315
  * Returns a diagnostics report about the currently active connections with the
305
316
  * cluster. Includes information about remote and local addresses, last activity,
package/dist/cluster.js CHANGED
@@ -317,6 +317,28 @@ class Cluster {
317
317
  const options_ = options;
318
318
  return utilities_1.PromiseHelper.wrapAsync(() => exec.query(indexName, query, options_), callback);
319
319
  }
320
+ /**
321
+ * Executes a search query against the cluster.
322
+ *
323
+ * Volatile: This API is subject to change at any time.
324
+ *
325
+ * @param indexName The name of the index to query.
326
+ * @param request The SearchRequest describing the search to execute.
327
+ * @param options Optional parameters for this operation.
328
+ * @param callback A node-style callback to be invoked after execution.
329
+ */
330
+ search(indexName, request, options, callback) {
331
+ if (options instanceof Function) {
332
+ callback = arguments[2];
333
+ options = undefined;
334
+ }
335
+ if (!options) {
336
+ options = {};
337
+ }
338
+ const exec = new searchexecutor_1.SearchExecutor(this);
339
+ const options_ = options;
340
+ return utilities_1.PromiseHelper.wrapAsync(() => exec.query(indexName, request, options_), callback);
341
+ }
320
342
  /**
321
343
  * Returns a diagnostics report about the currently active connections with the
322
344
  * cluster. Includes information about remote and local addresses, last activity,
@@ -60,6 +60,7 @@ export * from './mutationstate';
60
60
  export * from './queryindexmanager';
61
61
  export * from './querytypes';
62
62
  export * from './scope';
63
+ export * from './scopesearchindexmanager';
63
64
  export * from './sdspecs';
64
65
  export * from './searchfacet';
65
66
  export * from './searchindexmanager';
@@ -70,6 +71,7 @@ export * from './streamablepromises';
70
71
  export * from './transactions';
71
72
  export * from './transcoders';
72
73
  export * from './usermanager';
74
+ export * from './vectorsearch';
73
75
  export * from './viewexecutor';
74
76
  export * from './viewindexmanager';
75
77
  export * from './viewtypes';
package/dist/couchbase.js CHANGED
@@ -89,6 +89,7 @@ __exportStar(require("./mutationstate"), exports);
89
89
  __exportStar(require("./queryindexmanager"), exports);
90
90
  __exportStar(require("./querytypes"), exports);
91
91
  __exportStar(require("./scope"), exports);
92
+ __exportStar(require("./scopesearchindexmanager"), exports);
92
93
  __exportStar(require("./sdspecs"), exports);
93
94
  __exportStar(require("./searchfacet"), exports);
94
95
  __exportStar(require("./searchindexmanager"), exports);
@@ -99,6 +100,7 @@ __exportStar(require("./streamablepromises"), exports);
99
100
  __exportStar(require("./transactions"), exports);
100
101
  __exportStar(require("./transcoders"), exports);
101
102
  __exportStar(require("./usermanager"), exports);
103
+ __exportStar(require("./vectorsearch"), exports);
102
104
  __exportStar(require("./viewexecutor"), exports);
103
105
  __exportStar(require("./viewindexmanager"), exports);
104
106
  __exportStar(require("./viewtypes"), exports);
@@ -264,11 +264,11 @@ export declare class CollectionQueryIndexManager {
264
264
  * Creates a new query index.
265
265
  *
266
266
  * @param indexName The name of the new index.
267
- * @param fields The fields which this index should cover.
267
+ * @param keys The keys which this index should cover.
268
268
  * @param options Optional parameters for this operation.
269
269
  * @param callback A node-style callback to be invoked after execution.
270
270
  */
271
- createIndex(indexName: string, fields: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
271
+ createIndex(indexName: string, keys: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
272
272
  /**
273
273
  * Creates a new primary query index.
274
274
  *
@@ -332,11 +332,11 @@ export declare class QueryIndexManager {
332
332
  *
333
333
  * @param bucketName The name of the bucket this index is for.
334
334
  * @param indexName The name of the new index.
335
- * @param fields The fields which this index should cover.
335
+ * @param keys The keys which this index should cover.
336
336
  * @param options Optional parameters for this operation.
337
337
  * @param callback A node-style callback to be invoked after execution.
338
338
  */
339
- createIndex(bucketName: string, indexName: string, fields: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
339
+ createIndex(bucketName: string, indexName: string, keys: string[], options?: CreateQueryIndexOptions, callback?: NodeCallback<void>): Promise<void>;
340
340
  /**
341
341
  * Creates a new primary query index.
342
342
  *
@@ -52,7 +52,7 @@ class InternalQueryIndexManager {
52
52
  scope_name: options.scopeName || '',
53
53
  collection_name: options.collectionName || '',
54
54
  index_name: options.name || '',
55
- fields: options.fields || [],
55
+ keys: options.keys || [],
56
56
  query_ctx: options.queryContext || this._queryContext,
57
57
  is_primary: isPrimary,
58
58
  ignore_if_exists: options.ignoreIfExists || false,
@@ -217,11 +217,11 @@ class CollectionQueryIndexManager {
217
217
  * Creates a new query index.
218
218
  *
219
219
  * @param indexName The name of the new index.
220
- * @param fields The fields which this index should cover.
220
+ * @param keys The keys which this index should cover.
221
221
  * @param options Optional parameters for this operation.
222
222
  * @param callback A node-style callback to be invoked after execution.
223
223
  */
224
- async createIndex(indexName, fields, options, callback) {
224
+ async createIndex(indexName, keys, options, callback) {
225
225
  if (options instanceof Function) {
226
226
  callback = arguments[2];
227
227
  options = undefined;
@@ -233,7 +233,7 @@ class CollectionQueryIndexManager {
233
233
  collectionName: this._collectionName,
234
234
  scopeName: this._scopeName,
235
235
  name: indexName,
236
- fields: fields,
236
+ keys: keys,
237
237
  ignoreIfExists: options.ignoreIfExists,
238
238
  numReplicas: options.numReplicas,
239
239
  deferred: options.deferred,
@@ -390,11 +390,11 @@ class QueryIndexManager {
390
390
  *
391
391
  * @param bucketName The name of the bucket this index is for.
392
392
  * @param indexName The name of the new index.
393
- * @param fields The fields which this index should cover.
393
+ * @param keys The keys which this index should cover.
394
394
  * @param options Optional parameters for this operation.
395
395
  * @param callback A node-style callback to be invoked after execution.
396
396
  */
397
- async createIndex(bucketName, indexName, fields, options, callback) {
397
+ async createIndex(bucketName, indexName, keys, options, callback) {
398
398
  if (options instanceof Function) {
399
399
  callback = arguments[3];
400
400
  options = undefined;
@@ -406,7 +406,7 @@ class QueryIndexManager {
406
406
  collectionName: options.collectionName,
407
407
  scopeName: options.scopeName,
408
408
  name: indexName,
409
- fields: fields,
409
+ keys: keys,
410
410
  ignoreIfExists: options.ignoreIfExists,
411
411
  numReplicas: options.numReplicas,
412
412
  deferred: options.deferred,
package/dist/scope.d.ts CHANGED
@@ -4,6 +4,8 @@ import { Bucket } from './bucket';
4
4
  import { Cluster } from './cluster';
5
5
  import { Collection } from './collection';
6
6
  import { QueryMetaData, QueryOptions, QueryResult } from './querytypes';
7
+ import { ScopeSearchIndexManager } from './scopesearchindexmanager';
8
+ import { SearchMetaData, SearchQueryOptions, SearchRequest, SearchResult, SearchRow } from './searchtypes';
7
9
  import { StreamableRowPromise } from './streamablepromises';
8
10
  import { Transcoder } from './transcoders';
9
11
  import { NodeCallback } from './utilities';
@@ -51,6 +53,14 @@ export declare class Scope {
51
53
  * @param collectionName The name of the collection to reference.
52
54
  */
53
55
  collection(collectionName: string): Collection;
56
+ /**
57
+ * Returns a SearchIndexManager which can be used to manage the search
58
+ * indexes of this scope.
59
+ *
60
+ * Volatile: This API is subject to change at any time.
61
+ *
62
+ */
63
+ searchIndexes(): ScopeSearchIndexManager;
54
64
  /**
55
65
  * Executes a N1QL query against the cluster scoped to this scope.
56
66
  *
@@ -67,4 +77,15 @@ export declare class Scope {
67
77
  * @param callback A node-style callback to be invoked after execution.
68
78
  */
69
79
  analyticsQuery<TRow = any>(statement: string, options?: AnalyticsQueryOptions, callback?: NodeCallback<AnalyticsResult<TRow>>): StreamableRowPromise<AnalyticsResult<TRow>, TRow, AnalyticsMetaData>;
80
+ /**
81
+ * Executes a search query against the scope.
82
+ *
83
+ * Volatile: This API is subject to change at any time.
84
+ *
85
+ * @param indexName The name of the index to query.
86
+ * @param request The SearchRequest describing the search to execute.
87
+ * @param options Optional parameters for this operation.
88
+ * @param callback A node-style callback to be invoked after execution.
89
+ */
90
+ search(indexName: string, request: SearchRequest, options?: SearchQueryOptions, callback?: NodeCallback<SearchResult>): StreamableRowPromise<SearchResult, SearchRow, SearchMetaData>;
70
91
  }