couchbase 4.6.0 → 4.7.0-dev.1
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.
- package/CMakeLists.txt +2 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +66 -93
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +24 -11
- package/deps/couchbase-cxx-client/README.md +17 -16
- package/deps/couchbase-cxx-client/cmake/APKBUILD.in +17 -1
- package/deps/couchbase-cxx-client/cmake/Bundler.cmake +9 -1
- package/deps/couchbase-cxx-client/cmake/Cache.cmake +48 -19
- package/deps/couchbase-cxx-client/cmake/CompilerOptions.cmake +3 -1
- package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +10 -2
- package/deps/couchbase-cxx-client/cmake/Packaging.cmake +48 -8
- package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +43 -1
- package/deps/couchbase-cxx-client/cmake/build_config.hxx.in +2 -0
- package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +18 -0
- package/deps/couchbase-cxx-client/cmake/debian/control +6 -1
- package/deps/couchbase-cxx-client/cmake/debian/rules +1 -0
- package/deps/couchbase-cxx-client/cmake/tarball_glob.txt +10 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_meter.cxx +1 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.cxx +45 -43
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.hxx +4 -3
- package/deps/couchbase-cxx-client/core/bucket.cxx +128 -13
- package/deps/couchbase-cxx-client/core/bucket.hxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster.cxx +304 -152
- package/deps/couchbase-cxx-client/core/cluster.hxx +32 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.cxx +25 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.hxx +5 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.cxx +72 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.hxx +46 -0
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +4 -0
- package/deps/couchbase-cxx-client/core/deprecation_utils.hxx +26 -0
- package/deps/couchbase-cxx-client/core/error.hxx +27 -0
- package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +0 -2
- package/deps/couchbase-cxx-client/core/http_component.cxx +12 -48
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +3 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +249 -137
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +134 -58
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +87 -35
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +560 -245
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +89 -49
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +4 -4
- package/deps/couchbase-cxx-client/core/impl/error.cxx +20 -13
- package/deps/couchbase-cxx-client/core/impl/error.hxx +15 -10
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.cxx +161 -0
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.hxx +77 -0
- package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/public_bucket.cxx +31 -7
- package/deps/couchbase-cxx-client/core/impl/public_cluster.cxx +107 -19
- package/deps/couchbase-cxx-client/core/impl/query.cxx +6 -3
- package/deps/couchbase-cxx-client/core/impl/query.hxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +267 -102
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +53 -11
- package/deps/couchbase-cxx-client/core/impl/search.cxx +8 -4
- package/deps/couchbase-cxx-client/core/impl/search.hxx +6 -2
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +131 -41
- package/deps/couchbase-cxx-client/core/impl/with_cancellation.hxx +75 -0
- package/deps/couchbase-cxx-client/core/io/config_tracker.cxx +9 -9
- package/deps/couchbase-cxx-client/core/io/config_tracker.hxx +2 -1
- package/deps/couchbase-cxx-client/core/io/http_command.hxx +98 -49
- package/deps/couchbase-cxx-client/core/io/http_context.hxx +2 -0
- package/deps/couchbase-cxx-client/core/io/http_session.cxx +23 -10
- package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -9
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +163 -228
- package/deps/couchbase-cxx-client/core/io/http_traits.hxx +0 -7
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +123 -44
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +251 -26
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_traits.hxx +0 -8
- package/deps/couchbase-cxx-client/core/io/streams.cxx +3 -3
- package/deps/couchbase-cxx-client/core/io/streams.hxx +3 -2
- package/deps/couchbase-cxx-client/core/meta/features.hxx +15 -0
- package/deps/couchbase-cxx-client/core/meta/version.cxx +13 -0
- package/deps/couchbase-cxx-client/core/meta/version.hxx +3 -0
- package/deps/couchbase-cxx-client/core/metrics/constants.hxx +23 -0
- package/deps/couchbase-cxx-client/core/metrics/logging_meter.cxx +5 -5
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +65 -63
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +12 -10
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +77 -27
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +83 -2
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +46 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +121 -43
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +0 -6
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_view.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +10 -13
- package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +68 -30
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +4 -3
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/operation_traits.hxx +6 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +8 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +67 -12
- package/deps/couchbase-cxx-client/core/origin.hxx +13 -8
- package/deps/couchbase-cxx-client/core/orphan_reporter.cxx +164 -0
- package/deps/couchbase-cxx-client/core/orphan_reporter.hxx +65 -0
- package/deps/couchbase-cxx-client/core/sasl/CMakeLists.txt +1 -0
- package/deps/couchbase-cxx-client/core/sasl/client.cc +6 -0
- package/deps/couchbase-cxx-client/core/sasl/mechanism.cc +2 -1
- package/deps/couchbase-cxx-client/core/sasl/mechanism.h +2 -1
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.cc +41 -0
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.h +47 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.cxx +44 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.hxx +44 -0
- package/deps/couchbase-cxx-client/core/tracing/attribute_helpers.hxx +45 -0
- package/deps/couchbase-cxx-client/core/tracing/constants.hxx +148 -68
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_options.hxx +0 -3
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.cxx +122 -170
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +17 -24
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +8 -10
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.cxx +114 -0
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.hxx +85 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +1 -2
- package/deps/couchbase-cxx-client/core/utils/byteswap.hxx +12 -0
- package/deps/couchbase-cxx-client/core/utils/concurrent_fixed_priority_queue.hxx +102 -0
- package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/certificate_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +47 -0
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +16 -0
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +60 -15
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +48 -48
- package/deps/couchbase-cxx-client/couchbase/jwt_authenticator.hxx +52 -0
- package/deps/couchbase-cxx-client/couchbase/metrics/meter.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +75 -80
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/password_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/tracing/otel_tracer.hxx +15 -17
- package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +2 -2
- package/dist/analyticsexecutor.d.ts +15 -0
- package/dist/analyticsexecutor.js +79 -50
- package/dist/analyticsindexmanager.d.ts +66 -0
- package/dist/analyticsindexmanager.js +404 -277
- package/dist/analyticstypes.d.ts +5 -0
- package/dist/authenticators.d.ts +34 -1
- package/dist/authenticators.js +19 -1
- package/dist/binarycollection.d.ts +17 -0
- package/dist/binding.d.ts +245 -228
- package/dist/binding.js +2 -2
- package/dist/bindingutilities.js +1 -1
- package/dist/bucket.d.ts +8 -0
- package/dist/bucket.js +8 -0
- package/dist/bucketmanager.d.ts +30 -0
- package/dist/bucketmanager.js +128 -69
- package/dist/cluster.d.ts +45 -0
- package/dist/cluster.js +133 -23
- package/dist/collection.d.ts +75 -2
- package/dist/collection.js +773 -552
- package/dist/collectionmanager.d.ts +34 -0
- package/dist/collectionmanager.js +172 -89
- package/dist/couchbase.d.ts +5 -0
- package/dist/couchbase.js +5 -0
- package/dist/datastructures.js +310 -97
- package/dist/diagnosticsexecutor.js +1 -1
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +12 -1
- package/dist/eventingfunctionmanager.d.ts +42 -0
- package/dist/eventingfunctionmanager.js +172 -100
- package/dist/logger.d.ts +192 -0
- package/dist/logger.js +213 -0
- package/dist/loggingmeter.d.ts +120 -0
- package/dist/loggingmeter.js +226 -0
- package/dist/metrics.d.ts +33 -0
- package/dist/metrics.js +5 -0
- package/dist/observability.d.ts +60 -0
- package/dist/observability.js +86 -0
- package/dist/observabilityhandler.d.ts +176 -0
- package/dist/observabilityhandler.js +733 -0
- package/dist/observabilitytypes.d.ts +320 -0
- package/dist/observabilitytypes.js +362 -0
- package/dist/observabilityutilities.d.ts +60 -0
- package/dist/observabilityutilities.js +175 -0
- package/dist/otelmeter.d.ts +51 -0
- package/dist/otelmeter.js +100 -0
- package/dist/oteltracer.d.ts +69 -0
- package/dist/oteltracer.js +141 -0
- package/dist/queryexecutor.d.ts +16 -0
- package/dist/queryexecutor.js +128 -86
- package/dist/queryindexmanager.d.ts +29 -0
- package/dist/queryindexmanager.js +277 -150
- package/dist/querytypes.d.ts +5 -0
- package/dist/scope.js +2 -2
- package/dist/scopeeventingfunctionmanager.d.ts +5 -0
- package/dist/scopeeventingfunctionmanager.js +217 -119
- package/dist/scopesearchindexmanager.d.ts +5 -0
- package/dist/scopesearchindexmanager.js +295 -166
- package/dist/sdspecs.js +6 -1
- package/dist/searchexecutor.d.ts +15 -0
- package/dist/searchexecutor.js +54 -26
- package/dist/searchindexmanager.d.ts +54 -0
- package/dist/searchindexmanager.js +235 -142
- package/dist/searchtypes.d.ts +5 -0
- package/dist/thresholdlogging.d.ts +301 -0
- package/dist/thresholdlogging.js +657 -0
- package/dist/tracing.d.ts +55 -0
- package/dist/tracing.js +2 -0
- package/dist/transactions.js +1 -1
- package/dist/transcoders.js +1 -1
- package/dist/usermanager.d.ts +46 -0
- package/dist/usermanager.js +199 -118
- package/dist/utilities.d.ts +4 -0
- package/dist/utilities.js +11 -1
- package/dist/utilities_internal.js +0 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.js +7 -0
- package/dist/viewexecutor.d.ts +15 -0
- package/dist/viewexecutor.js +54 -29
- package/dist/viewindexmanager.d.ts +30 -0
- package/dist/viewindexmanager.js +129 -100
- package/dist/viewtypes.d.ts +5 -0
- package/package.json +32 -18
- package/scripts/buildPrebuild.js +2 -0
- package/scripts/install.js +2 -0
- package/scripts/prebuilds.js +7 -8
- package/scripts/prune.js +2 -0
- package/scripts/updateVersion.js +26 -0
- package/src/connection.cpp +79 -98
- package/src/connection.hpp +46 -38
- package/src/connection_autogen.cpp +1236 -292
- package/src/jstocbpp_autogen.hpp +1117 -313
- package/src/jstocbpp_basic.hpp +73 -0
- package/src/jstocbpp_defs.hpp +37 -9
- package/src/jstocbpp_errors.hpp +37 -11
- package/tools/gen-bindings-js.js +100 -22
- package/tools/gen-bindings-json.py +40 -6
- package/src/transcoder.hpp +0 -96
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SearchIndexManager = exports.SearchIndex = void 0;
|
|
4
4
|
const utilities_1 = require("./utilities");
|
|
5
|
-
const
|
|
5
|
+
const observability_1 = require("./observability");
|
|
6
|
+
const observabilityhandler_1 = require("./observabilityhandler");
|
|
7
|
+
const observabilitytypes_1 = require("./observabilitytypes");
|
|
6
8
|
/**
|
|
7
9
|
* This class is currently incomplete and must be casted to `any` in
|
|
8
10
|
* TypeScript to be used.
|
|
@@ -81,6 +83,12 @@ class SearchIndexManager {
|
|
|
81
83
|
constructor(cluster) {
|
|
82
84
|
this._cluster = cluster;
|
|
83
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
get observabilityInstruments() {
|
|
90
|
+
return this._cluster.observabilityInstruments;
|
|
91
|
+
}
|
|
84
92
|
/**
|
|
85
93
|
* Returns an index by it's name.
|
|
86
94
|
*
|
|
@@ -96,20 +104,27 @@ class SearchIndexManager {
|
|
|
96
104
|
if (!options) {
|
|
97
105
|
options = {};
|
|
98
106
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexGet, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
108
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
109
|
+
try {
|
|
110
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
111
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
112
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexGet.bind(this._cluster.conn), {
|
|
113
|
+
index_name: indexName,
|
|
114
|
+
timeout: timeout,
|
|
115
|
+
}, obsReqHandler);
|
|
106
116
|
if (err) {
|
|
107
|
-
|
|
117
|
+
obsReqHandler.endWithError(err);
|
|
118
|
+
throw err;
|
|
108
119
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
}
|
|
120
|
+
obsReqHandler.end();
|
|
121
|
+
return SearchIndex._fromCppData(resp.index);
|
|
122
|
+
}, callback);
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
obsReqHandler.endWithError(err);
|
|
126
|
+
throw err;
|
|
127
|
+
}
|
|
113
128
|
}
|
|
114
129
|
/**
|
|
115
130
|
* Returns a list of all existing indexes.
|
|
@@ -125,19 +140,26 @@ class SearchIndexManager {
|
|
|
125
140
|
if (!options) {
|
|
126
141
|
options = {};
|
|
127
142
|
}
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const err = (0,
|
|
143
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexGetAll, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
144
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
145
|
+
try {
|
|
146
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
147
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
148
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexGetAll.bind(this._cluster.conn), {
|
|
149
|
+
timeout: timeout,
|
|
150
|
+
}, obsReqHandler);
|
|
134
151
|
if (err) {
|
|
135
|
-
|
|
152
|
+
obsReqHandler.endWithError(err);
|
|
153
|
+
throw err;
|
|
136
154
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
});
|
|
140
|
-
}
|
|
155
|
+
obsReqHandler.end();
|
|
156
|
+
return resp.indexes.map((indexData) => SearchIndex._fromCppData(indexData));
|
|
157
|
+
}, callback);
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
obsReqHandler.endWithError(err);
|
|
161
|
+
throw err;
|
|
162
|
+
}
|
|
141
163
|
}
|
|
142
164
|
/**
|
|
143
165
|
* Creates or updates an existing index.
|
|
@@ -154,19 +176,26 @@ class SearchIndexManager {
|
|
|
154
176
|
if (!options) {
|
|
155
177
|
options = {};
|
|
156
178
|
}
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexUpsert, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
180
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
181
|
+
try {
|
|
182
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
183
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
184
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexUpsert.bind(this._cluster.conn), {
|
|
185
|
+
index: SearchIndex._toCppData(indexDefinition),
|
|
186
|
+
timeout: timeout,
|
|
187
|
+
}, obsReqHandler);
|
|
164
188
|
if (err) {
|
|
165
|
-
|
|
189
|
+
obsReqHandler.endWithError(err);
|
|
190
|
+
throw err;
|
|
166
191
|
}
|
|
167
|
-
|
|
168
|
-
});
|
|
169
|
-
}
|
|
192
|
+
obsReqHandler.end();
|
|
193
|
+
}, callback);
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
obsReqHandler.endWithError(err);
|
|
197
|
+
throw err;
|
|
198
|
+
}
|
|
170
199
|
}
|
|
171
200
|
/**
|
|
172
201
|
* Drops an index.
|
|
@@ -183,19 +212,26 @@ class SearchIndexManager {
|
|
|
183
212
|
if (!options) {
|
|
184
213
|
options = {};
|
|
185
214
|
}
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
215
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexDrop, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
216
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
217
|
+
try {
|
|
218
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
219
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
220
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexDrop.bind(this._cluster.conn), {
|
|
221
|
+
index_name: indexName,
|
|
222
|
+
timeout: timeout,
|
|
223
|
+
}, obsReqHandler);
|
|
193
224
|
if (err) {
|
|
194
|
-
|
|
225
|
+
obsReqHandler.endWithError(err);
|
|
226
|
+
throw err;
|
|
195
227
|
}
|
|
196
|
-
|
|
197
|
-
});
|
|
198
|
-
}
|
|
228
|
+
obsReqHandler.end();
|
|
229
|
+
}, callback);
|
|
230
|
+
}
|
|
231
|
+
catch (err) {
|
|
232
|
+
obsReqHandler.endWithError(err);
|
|
233
|
+
throw err;
|
|
234
|
+
}
|
|
199
235
|
}
|
|
200
236
|
/**
|
|
201
237
|
* Returns the number of documents that have been indexed.
|
|
@@ -212,19 +248,27 @@ class SearchIndexManager {
|
|
|
212
248
|
if (!options) {
|
|
213
249
|
options = {};
|
|
214
250
|
}
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
251
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexGetDocumentsCount, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
252
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
253
|
+
try {
|
|
254
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
255
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
256
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexGetDocumentsCount.bind(this._cluster.conn), {
|
|
257
|
+
index_name: indexName,
|
|
258
|
+
timeout: timeout,
|
|
259
|
+
}, obsReqHandler);
|
|
222
260
|
if (err) {
|
|
223
|
-
|
|
261
|
+
obsReqHandler.endWithError(err);
|
|
262
|
+
throw err;
|
|
224
263
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
264
|
+
obsReqHandler.end();
|
|
265
|
+
return resp.count;
|
|
266
|
+
}, callback);
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
obsReqHandler.endWithError(err);
|
|
270
|
+
throw err;
|
|
271
|
+
}
|
|
228
272
|
}
|
|
229
273
|
/**
|
|
230
274
|
* Pauses the ingestion of documents into an index.
|
|
@@ -241,20 +285,27 @@ class SearchIndexManager {
|
|
|
241
285
|
if (!options) {
|
|
242
286
|
options = {};
|
|
243
287
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
288
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexPauseIngest, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
289
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
290
|
+
try {
|
|
291
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
292
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
293
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlIngest.bind(this._cluster.conn), {
|
|
294
|
+
index_name: indexName,
|
|
295
|
+
pause: true,
|
|
296
|
+
timeout: timeout,
|
|
297
|
+
}, obsReqHandler);
|
|
252
298
|
if (err) {
|
|
253
|
-
|
|
299
|
+
obsReqHandler.endWithError(err);
|
|
300
|
+
throw err;
|
|
254
301
|
}
|
|
255
|
-
|
|
256
|
-
});
|
|
257
|
-
}
|
|
302
|
+
obsReqHandler.end();
|
|
303
|
+
}, callback);
|
|
304
|
+
}
|
|
305
|
+
catch (err) {
|
|
306
|
+
obsReqHandler.endWithError(err);
|
|
307
|
+
throw err;
|
|
308
|
+
}
|
|
258
309
|
}
|
|
259
310
|
/**
|
|
260
311
|
* Resumes the ingestion of documents into an index.
|
|
@@ -271,20 +322,27 @@ class SearchIndexManager {
|
|
|
271
322
|
if (!options) {
|
|
272
323
|
options = {};
|
|
273
324
|
}
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
325
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexResumeIngest, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
326
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
327
|
+
try {
|
|
328
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
329
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
330
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlIngest.bind(this._cluster.conn), {
|
|
331
|
+
index_name: indexName,
|
|
332
|
+
pause: false,
|
|
333
|
+
timeout: timeout,
|
|
334
|
+
}, obsReqHandler);
|
|
282
335
|
if (err) {
|
|
283
|
-
|
|
336
|
+
obsReqHandler.endWithError(err);
|
|
337
|
+
throw err;
|
|
284
338
|
}
|
|
285
|
-
|
|
286
|
-
});
|
|
287
|
-
}
|
|
339
|
+
obsReqHandler.end();
|
|
340
|
+
}, callback);
|
|
341
|
+
}
|
|
342
|
+
catch (err) {
|
|
343
|
+
obsReqHandler.endWithError(err);
|
|
344
|
+
throw err;
|
|
345
|
+
}
|
|
288
346
|
}
|
|
289
347
|
/**
|
|
290
348
|
* Enables querying of an index.
|
|
@@ -301,20 +359,27 @@ class SearchIndexManager {
|
|
|
301
359
|
if (!options) {
|
|
302
360
|
options = {};
|
|
303
361
|
}
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
362
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexAllowQuerying, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
363
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
364
|
+
try {
|
|
365
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
366
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
367
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlQuery.bind(this._cluster.conn), {
|
|
368
|
+
index_name: indexName,
|
|
369
|
+
allow: true,
|
|
370
|
+
timeout: timeout,
|
|
371
|
+
}, obsReqHandler);
|
|
312
372
|
if (err) {
|
|
313
|
-
|
|
373
|
+
obsReqHandler.endWithError(err);
|
|
374
|
+
throw err;
|
|
314
375
|
}
|
|
315
|
-
|
|
316
|
-
});
|
|
317
|
-
}
|
|
376
|
+
obsReqHandler.end();
|
|
377
|
+
}, callback);
|
|
378
|
+
}
|
|
379
|
+
catch (err) {
|
|
380
|
+
obsReqHandler.endWithError(err);
|
|
381
|
+
throw err;
|
|
382
|
+
}
|
|
318
383
|
}
|
|
319
384
|
/**
|
|
320
385
|
* Disables querying of an index.
|
|
@@ -331,20 +396,27 @@ class SearchIndexManager {
|
|
|
331
396
|
if (!options) {
|
|
332
397
|
options = {};
|
|
333
398
|
}
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
399
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexDisallowQuerying, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
400
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
401
|
+
try {
|
|
402
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
403
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
404
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlQuery.bind(this._cluster.conn), {
|
|
405
|
+
index_name: indexName,
|
|
406
|
+
allow: false,
|
|
407
|
+
timeout: timeout,
|
|
408
|
+
}, obsReqHandler);
|
|
342
409
|
if (err) {
|
|
343
|
-
|
|
410
|
+
obsReqHandler.endWithError(err);
|
|
411
|
+
throw err;
|
|
344
412
|
}
|
|
345
|
-
|
|
346
|
-
});
|
|
347
|
-
}
|
|
413
|
+
obsReqHandler.end();
|
|
414
|
+
}, callback);
|
|
415
|
+
}
|
|
416
|
+
catch (err) {
|
|
417
|
+
obsReqHandler.endWithError(err);
|
|
418
|
+
throw err;
|
|
419
|
+
}
|
|
348
420
|
}
|
|
349
421
|
/**
|
|
350
422
|
* Freezes the indexing plan for execution of queries.
|
|
@@ -361,20 +433,27 @@ class SearchIndexManager {
|
|
|
361
433
|
if (!options) {
|
|
362
434
|
options = {};
|
|
363
435
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
436
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexFreezePlan, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
437
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
438
|
+
try {
|
|
439
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
440
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
441
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlPlanFreeze.bind(this._cluster.conn), {
|
|
442
|
+
index_name: indexName,
|
|
443
|
+
freeze: true,
|
|
444
|
+
timeout: timeout,
|
|
445
|
+
}, obsReqHandler);
|
|
372
446
|
if (err) {
|
|
373
|
-
|
|
447
|
+
obsReqHandler.endWithError(err);
|
|
448
|
+
throw err;
|
|
374
449
|
}
|
|
375
|
-
|
|
376
|
-
});
|
|
377
|
-
}
|
|
450
|
+
obsReqHandler.end();
|
|
451
|
+
}, callback);
|
|
452
|
+
}
|
|
453
|
+
catch (err) {
|
|
454
|
+
obsReqHandler.endWithError(err);
|
|
455
|
+
throw err;
|
|
456
|
+
}
|
|
378
457
|
}
|
|
379
458
|
/**
|
|
380
459
|
* Unfreezes the indexing plan for execution of queries.
|
|
@@ -391,20 +470,27 @@ class SearchIndexManager {
|
|
|
391
470
|
if (!options) {
|
|
392
471
|
options = {};
|
|
393
472
|
}
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
473
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexUnfreezePlan, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
474
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
475
|
+
try {
|
|
476
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
477
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
478
|
+
const [err, _] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexControlPlanFreeze.bind(this._cluster.conn), {
|
|
479
|
+
index_name: indexName,
|
|
480
|
+
freeze: false,
|
|
481
|
+
timeout: timeout,
|
|
482
|
+
}, obsReqHandler);
|
|
402
483
|
if (err) {
|
|
403
|
-
|
|
484
|
+
obsReqHandler.endWithError(err);
|
|
485
|
+
throw err;
|
|
404
486
|
}
|
|
405
|
-
|
|
406
|
-
});
|
|
407
|
-
}
|
|
487
|
+
obsReqHandler.end();
|
|
488
|
+
}, callback);
|
|
489
|
+
}
|
|
490
|
+
catch (err) {
|
|
491
|
+
obsReqHandler.endWithError(err);
|
|
492
|
+
throw err;
|
|
493
|
+
}
|
|
408
494
|
}
|
|
409
495
|
/**
|
|
410
496
|
* Performs analysis of a specific document by an index.
|
|
@@ -422,21 +508,28 @@ class SearchIndexManager {
|
|
|
422
508
|
if (!options) {
|
|
423
509
|
options = {};
|
|
424
510
|
}
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
511
|
+
const obsReqHandler = new observabilityhandler_1.ObservableRequestHandler(observabilitytypes_1.SearchIndexMgmtOp.SearchIndexAnalyzeDocument, this.observabilityInstruments, options === null || options === void 0 ? void 0 : options.parentSpan);
|
|
512
|
+
obsReqHandler.setRequestHttpAttributes();
|
|
513
|
+
try {
|
|
514
|
+
const timeout = options.timeout || this._cluster.managementTimeout;
|
|
515
|
+
return utilities_1.PromiseHelper.wrapAsync(async () => {
|
|
516
|
+
const [err, resp] = await (0, observability_1.wrapObservableBindingCall)(this._cluster.conn.managementSearchIndexAnalyzeDocument.bind(this._cluster.conn), {
|
|
517
|
+
index_name: indexName,
|
|
518
|
+
encoded_document: JSON.stringify(document),
|
|
519
|
+
timeout: timeout,
|
|
520
|
+
}, obsReqHandler);
|
|
433
521
|
if (err) {
|
|
434
|
-
|
|
522
|
+
obsReqHandler.endWithError(err);
|
|
523
|
+
throw err;
|
|
435
524
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
});
|
|
439
|
-
}
|
|
525
|
+
obsReqHandler.end();
|
|
526
|
+
return JSON.parse(resp.analysis);
|
|
527
|
+
}, callback);
|
|
528
|
+
}
|
|
529
|
+
catch (err) {
|
|
530
|
+
obsReqHandler.endWithError(err);
|
|
531
|
+
throw err;
|
|
532
|
+
}
|
|
440
533
|
}
|
|
441
534
|
}
|
|
442
535
|
exports.SearchIndexManager = SearchIndexManager;
|
package/dist/searchtypes.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { SearchFacet } from './searchfacet';
|
|
|
3
3
|
import { SearchQuery } from './searchquery';
|
|
4
4
|
import { SearchSort } from './searchsort';
|
|
5
5
|
import { VectorSearch } from './vectorsearch';
|
|
6
|
+
import { RequestSpan } from './tracing';
|
|
6
7
|
/**
|
|
7
8
|
* SearchMetaData represents the meta-data available from a search query.
|
|
8
9
|
* This class is currently incomplete and must be casted to `any` in
|
|
@@ -160,6 +161,10 @@ export interface SearchQueryOptions {
|
|
|
160
161
|
* Specifies that the search response should appear in the log.
|
|
161
162
|
*/
|
|
162
163
|
logResponse?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Specifies the parent span for this specific operation.
|
|
166
|
+
*/
|
|
167
|
+
parentSpan?: RequestSpan;
|
|
163
168
|
}
|
|
164
169
|
/**
|
|
165
170
|
* Represents a search query and/or vector search to execute via the Couchbase Full Text Search (FTS) service.
|