couchbase 3.8.2 → 3.9.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/CMakeLists.txt +16 -1
- data/ext/cache/cpm/{CPM_0.42.0.cmake → CPM_0.43.1.cmake} +18 -2
- data/ext/cache/extconf_include.rb +6 -6
- data/ext/cache/mozilla-ca-bundle.crt +121 -55
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/couchbase/CMakeLists.txt +136 -23
- data/ext/couchbase/cmake/APKBUILD.in +25 -4
- data/ext/couchbase/cmake/Bundler.cmake +143 -34
- data/ext/couchbase/cmake/CPM.cmake +126 -12
- data/ext/couchbase/cmake/Cache.cmake +7 -1
- data/ext/couchbase/cmake/CompilerOptions.cmake +1 -1
- data/ext/couchbase/cmake/CompilerWarnings.cmake +17 -6
- data/ext/couchbase/cmake/GrpcProtobuf.cmake +481 -0
- data/ext/couchbase/cmake/OpenSSL.cmake +82 -7
- data/ext/couchbase/cmake/Packaging.cmake +519 -65
- data/ext/couchbase/cmake/Protostellar.cmake +250 -0
- data/ext/couchbase/cmake/Sanitizers.cmake +61 -50
- data/ext/couchbase/cmake/StaticAnalyzers.cmake +16 -5
- data/ext/couchbase/cmake/TestFramework.cmake +283 -0
- data/ext/couchbase/cmake/TestFrameworkAddTests.cmake +51 -0
- data/ext/couchbase/cmake/Testing.cmake +27 -9
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +141 -8
- data/ext/couchbase/cmake/VersionInfo.cmake +50 -0
- data/ext/couchbase/cmake/build_config.hxx.in +2 -1
- data/ext/couchbase/cmake/couchbase-cxx-client.spec.in +101 -23
- data/ext/couchbase/cmake/couchbase_cxx_client_static-config.cmake.in +7 -0
- data/ext/couchbase/cmake/couchbase_cxx_client_static.pc.in +2 -0
- data/ext/couchbase/cmake/gRPC_Generate.cmake +58 -0
- data/ext/couchbase/cmake/protobuf_Generate.cmake +69 -0
- data/ext/couchbase/cmake/require-git-checkout.cmake +25 -0
- data/ext/couchbase/cmake/tarball_glob.txt +49 -0
- data/ext/couchbase/core/agent_group.cxx +0 -8
- data/ext/couchbase/core/agent_group.hxx +0 -4
- data/ext/couchbase/core/analytics_stream.cxx +314 -0
- data/ext/couchbase/core/analytics_stream.hxx +129 -0
- data/ext/couchbase/core/analytics_stream_component.cxx +245 -0
- data/ext/couchbase/core/analytics_stream_component.hxx +67 -0
- data/ext/couchbase/core/app_telemetry_meter.cxx +25 -3
- data/ext/couchbase/core/app_telemetry_meter.hxx +77 -0
- data/ext/couchbase/core/app_telemetry_reporter.cxx +7 -6
- data/ext/couchbase/core/bucket.cxx +381 -87
- data/ext/couchbase/core/bucket.hxx +105 -25
- data/ext/couchbase/core/bucket_unit_test_api.hxx +57 -0
- data/ext/couchbase/core/capella.hxx +91 -0
- data/ext/couchbase/core/cluster.cxx +1551 -397
- data/ext/couchbase/core/cluster.hxx +39 -8
- data/ext/couchbase/core/cluster_agent.cxx +0 -8
- data/ext/couchbase/core/cluster_agent.hxx +0 -4
- data/ext/couchbase/core/cluster_options.hxx +26 -3
- data/ext/couchbase/core/collections_component.cxx +39 -15
- data/ext/couchbase/core/config_profiles.cxx +1 -1
- data/ext/couchbase/core/crud_component.cxx +2 -2
- data/ext/couchbase/core/crud_options.hxx +34 -0
- data/ext/couchbase/core/crypto/cbcrypto.cc +18 -13
- data/ext/couchbase/core/document_id_redaction.hxx +81 -0
- data/ext/couchbase/core/error_context/base_error_context.hxx +7 -6
- data/ext/couchbase/core/error_context/key_value.cxx +25 -2
- data/ext/couchbase/core/error_context/key_value.hxx +60 -33
- data/ext/couchbase/core/error_context/key_value_error_context.hxx +16 -15
- data/ext/couchbase/core/error_context/search.hxx +5 -0
- data/ext/couchbase/core/error_context/search_json.hxx +3 -0
- data/ext/couchbase/core/error_context/subdocument_error_context.hxx +19 -18
- data/ext/couchbase/core/error_context/view.hxx +5 -0
- data/ext/couchbase/core/free_form_http_request.cxx +237 -4
- data/ext/couchbase/core/free_form_http_request.hxx +41 -8
- data/ext/couchbase/core/http_component.cxx +300 -284
- data/ext/couchbase/core/http_component.hxx +0 -4
- data/ext/couchbase/core/impl/analytics.cxx +38 -5
- data/ext/couchbase/core/impl/analytics.hxx +34 -0
- data/ext/couchbase/core/impl/bootstrap_error.hxx +0 -3
- data/ext/couchbase/core/impl/collection.cxx +215 -202
- data/ext/couchbase/core/impl/collection_manager.cxx +1 -1
- data/ext/couchbase/core/impl/dns_srv_tracker.cxx +45 -18
- data/ext/couchbase/core/impl/error.cxx +22 -2
- data/ext/couchbase/core/impl/internal_analytics_stream_result.hxx +111 -0
- data/ext/couchbase/core/impl/internal_query_stream_result.hxx +110 -0
- data/ext/couchbase/core/impl/invoke_with_node_id.hxx +15 -7
- data/ext/couchbase/core/impl/key_value_error_category.cxx +6 -0
- data/ext/couchbase/core/impl/lookup_in_replica.cxx +10 -10
- data/ext/couchbase/core/impl/lookup_in_replica.hxx +4 -4
- data/ext/couchbase/core/impl/node_id.cxx +49 -13
- data/ext/couchbase/core/impl/observability_recorder.cxx +12 -2
- data/ext/couchbase/core/impl/observe_poll.cxx +63 -23
- data/ext/couchbase/core/impl/public_analytics_stream_result.cxx +372 -0
- data/ext/couchbase/core/impl/public_bucket.cxx +48 -2
- data/ext/couchbase/core/impl/public_cluster.cxx +229 -42
- data/ext/couchbase/core/impl/public_query_stream_result.cxx +380 -0
- data/ext/couchbase/core/impl/public_transaction_get_multi_replicas_from_preferred_server_group_result.cxx +42 -0
- data/ext/couchbase/core/impl/public_transaction_get_multi_result.cxx +42 -0
- data/ext/couchbase/core/impl/query.cxx +76 -7
- data/ext/couchbase/core/impl/query.hxx +36 -0
- data/ext/couchbase/core/impl/query_index_manager.cxx +54 -1
- data/ext/couchbase/core/impl/replica_utils.cxx +101 -0
- data/ext/couchbase/core/impl/replica_utils.hxx +64 -0
- data/ext/couchbase/core/impl/resolve_node_id.hxx +125 -0
- data/ext/couchbase/core/impl/scope.cxx +70 -0
- data/ext/couchbase/core/impl/search.cxx +31 -1
- data/ext/couchbase/core/impl/transactions.cxx +130 -0
- data/ext/couchbase/core/impl/wait_until_ready.cxx +439 -0
- data/ext/couchbase/core/impl/wait_until_ready.hxx +110 -0
- data/ext/couchbase/core/impl/with_bucket_config_or_timeout.hxx +180 -0
- data/ext/couchbase/core/impl/with_cancellation.hxx +11 -3
- data/ext/couchbase/core/io/configuration_belongs_to_session.hxx +1 -2
- data/ext/couchbase/core/io/dns_client.cxx +122 -45
- data/ext/couchbase/core/io/dns_codec.hxx +21 -21
- data/ext/couchbase/core/io/dns_config.cxx +21 -6
- data/ext/couchbase/core/io/http_command.hxx +149 -121
- data/ext/couchbase/core/io/http_error.hxx +107 -0
- data/ext/couchbase/core/io/http_parser.cxx +4 -0
- data/ext/couchbase/core/io/http_session.cxx +606 -154
- data/ext/couchbase/core/io/http_session.hxx +147 -30
- data/ext/couchbase/core/io/http_session_manager.hxx +329 -382
- data/ext/couchbase/core/io/http_streaming_parser.cxx +4 -0
- data/ext/couchbase/core/io/http_streaming_response.cxx +328 -43
- data/ext/couchbase/core/io/http_streaming_response.hxx +37 -3
- data/ext/couchbase/core/io/mcbp_buffer_pool.hxx +122 -0
- data/ext/couchbase/core/io/mcbp_command.hxx +150 -51
- data/ext/couchbase/core/io/mcbp_command_id.hxx +45 -0
- data/ext/couchbase/core/io/mcbp_message.cxx +9 -1
- data/ext/couchbase/core/io/mcbp_message.hxx +19 -0
- data/ext/couchbase/core/io/mcbp_output_queue.hxx +150 -0
- data/ext/couchbase/core/io/mcbp_parser.cxx +24 -7
- data/ext/couchbase/core/io/mcbp_session.cxx +309 -301
- data/ext/couchbase/core/io/mcbp_session.hxx +27 -18
- data/ext/couchbase/core/io/opaque_ring_table.hxx +145 -0
- data/ext/couchbase/core/io/retry_orchestrator.hxx +6 -5
- data/ext/couchbase/core/io/stream_deadline.hxx +50 -0
- data/ext/couchbase/core/io/streams.cxx +151 -21
- data/ext/couchbase/core/io/streams.hxx +48 -1
- data/ext/couchbase/core/logger/logger.cxx +36 -0
- data/ext/couchbase/core/logger/logger.hxx +46 -6
- data/ext/couchbase/core/logger/redaction.hxx +503 -0
- data/ext/couchbase/core/management/eventing_status.hxx +10 -0
- data/ext/couchbase/core/management/eventing_status_json.hxx +4 -0
- data/ext/couchbase/core/mcbp/big_endian.cxx +1 -1
- data/ext/couchbase/core/mcbp/codec.cxx +27 -18
- data/ext/couchbase/core/mcbp/operation_queue.cxx +2 -2
- data/ext/couchbase/core/mcbp/packet.hxx +2 -2
- data/ext/couchbase/core/mcbp/queue_request.cxx +23 -6
- data/ext/couchbase/core/mcbp/queue_request.hxx +21 -0
- data/ext/couchbase/core/meta/features.hxx +13 -0
- data/ext/couchbase/core/meta/version.cxx +6 -3
- data/ext/couchbase/core/metrics/logging_meter.cxx +5 -10
- data/ext/couchbase/core/metrics/meter_wrapper.cxx +63 -33
- data/ext/couchbase/core/metrics/meter_wrapper.hxx +55 -3
- data/ext/couchbase/core/operations/analytics_response_parsing.cxx +177 -0
- data/ext/couchbase/core/operations/analytics_response_parsing.hxx +55 -0
- data/ext/couchbase/core/operations/document_analytics.cxx +48 -130
- data/ext/couchbase/core/operations/document_analytics.hxx +14 -2
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +15 -7
- data/ext/couchbase/core/operations/document_get_any_replica.hxx +19 -8
- data/ext/couchbase/core/operations/document_get_projected.cxx +1 -1
- data/ext/couchbase/core/{impl/get_replica.cxx → operations/document_get_replica.cxx} +21 -3
- data/ext/couchbase/core/{impl/get_replica.hxx → operations/document_get_replica.hxx} +31 -4
- data/ext/couchbase/core/operations/document_lookup_in.cxx +10 -10
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +228 -198
- data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +215 -217
- data/ext/couchbase/core/operations/document_query.cxx +108 -221
- data/ext/couchbase/core/operations/document_query.hxx +18 -4
- data/ext/couchbase/core/operations/document_search.cxx +52 -8
- data/ext/couchbase/core/operations/document_search.hxx +3 -0
- data/ext/couchbase/core/operations/document_view.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_dataset_create.cxx +15 -8
- data/ext/couchbase/core/operations/management/analytics_dataset_create.hxx +4 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_drop.cxx +11 -6
- data/ext/couchbase/core/operations/management/analytics_dataset_get_all.cxx +3 -2
- data/ext/couchbase/core/operations/management/analytics_dataverse_create.cxx +10 -5
- data/ext/couchbase/core/operations/management/analytics_dataverse_drop.cxx +10 -5
- data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.cxx +2 -1
- data/ext/couchbase/core/operations/management/analytics_index_create.cxx +33 -8
- data/ext/couchbase/core/operations/management/analytics_index_drop.cxx +12 -7
- data/ext/couchbase/core/operations/management/analytics_index_get_all.cxx +3 -2
- data/ext/couchbase/core/operations/management/analytics_link_connect.cxx +11 -6
- data/ext/couchbase/core/operations/management/analytics_link_create.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_link_disconnect.cxx +10 -4
- data/ext/couchbase/core/operations/management/analytics_link_drop.cxx +6 -4
- data/ext/couchbase/core/operations/management/analytics_link_get_all.cxx +4 -3
- data/ext/couchbase/core/operations/management/analytics_link_replace.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_link_utils.hxx +1 -1
- data/ext/couchbase/core/operations/management/change_password.cxx +2 -0
- data/ext/couchbase/core/operations/management/collection_drop.cxx +5 -1
- data/ext/couchbase/core/operations/management/error_utils.cxx +60 -6
- data/ext/couchbase/core/operations/management/error_utils.hxx +29 -1
- data/ext/couchbase/core/operations/management/eventing_deploy_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_drop_function.cxx +8 -3
- data/ext/couchbase/core/operations/management/eventing_get_all_functions.cxx +4 -2
- data/ext/couchbase/core/operations/management/eventing_get_function.cxx +5 -3
- data/ext/couchbase/core/operations/management/eventing_get_status.cxx +4 -2
- data/ext/couchbase/core/operations/management/eventing_pause_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_resume_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_undeploy_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_upsert_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/group_drop.cxx +3 -1
- data/ext/couchbase/core/operations/management/group_get.cxx +3 -1
- data/ext/couchbase/core/operations/management/group_upsert.cxx +11 -8
- data/ext/couchbase/core/operations/management/query_index_build.cxx +5 -2
- data/ext/couchbase/core/operations/management/query_index_create.cxx +9 -3
- data/ext/couchbase/core/operations/management/query_index_drop.cxx +11 -4
- data/ext/couchbase/core/operations/management/query_index_get_all.cxx +1 -1
- data/ext/couchbase/core/operations/management/query_index_get_all_deferred.cxx +1 -1
- data/ext/couchbase/core/operations/management/scope_drop.cxx +5 -1
- data/ext/couchbase/core/operations/management/scope_get_all.cxx +6 -1
- data/ext/couchbase/core/operations/management/search_get_stats.cxx +10 -0
- data/ext/couchbase/core/operations/management/search_index_analyze_document.cxx +3 -2
- data/ext/couchbase/core/operations/management/search_index_control_ingest.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_control_query.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_drop.cxx +2 -2
- data/ext/couchbase/core/operations/management/search_index_get.cxx +2 -2
- data/ext/couchbase/core/operations/management/search_index_get_documents_count.cxx +3 -2
- data/ext/couchbase/core/operations/management/search_index_get_stats.cxx +3 -1
- data/ext/couchbase/core/operations/management/search_index_upsert.cxx +2 -2
- data/ext/couchbase/core/operations/management/user_drop.cxx +3 -1
- data/ext/couchbase/core/operations/management/user_get.cxx +3 -1
- data/ext/couchbase/core/operations/management/user_upsert.cxx +12 -9
- data/ext/couchbase/core/operations/management/view_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_upsert.cxx +1 -1
- data/ext/couchbase/core/operations/operation_traits.hxx +18 -0
- data/ext/couchbase/core/operations/query_response_parsing.cxx +211 -0
- data/ext/couchbase/core/operations/query_response_parsing.hxx +60 -0
- data/ext/couchbase/core/operations_fwd.hxx +3 -3
- data/ext/couchbase/core/origin.cxx +54 -26
- data/ext/couchbase/core/origin.hxx +12 -0
- data/ext/couchbase/core/orphan_reporter.cxx +2 -1
- data/ext/couchbase/core/platform/random.cc +7 -7
- data/ext/couchbase/core/protocol/client_request.cxx +2 -2
- data/ext/couchbase/core/protocol/client_request.hxx +38 -21
- data/ext/couchbase/core/protocol/client_response.cxx +11 -3
- data/ext/couchbase/core/protocol/client_response.hxx +27 -6
- data/ext/couchbase/core/protocol/cmd_append.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_cluster_map_change_notification.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_decrement.cxx +6 -6
- data/ext/couchbase/core/protocol/cmd_get.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_get_and_lock.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_and_touch.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_cluster_config.cxx +6 -4
- data/ext/couchbase/core/protocol/cmd_get_collection_id.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_error_map.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_get_meta.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_get_replica.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_hello.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_increment.cxx +6 -6
- data/ext/couchbase/core/protocol/cmd_insert.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_lookup_in.cxx +4 -3
- data/ext/couchbase/core/protocol/cmd_lookup_in_replica.cxx +4 -3
- data/ext/couchbase/core/protocol/cmd_mutate_in.cxx +10 -9
- data/ext/couchbase/core/protocol/cmd_mutate_in.hxx +10 -10
- data/ext/couchbase/core/protocol/cmd_observe_seqno.cxx +7 -7
- data/ext/couchbase/core/protocol/cmd_prepend.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_remove.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_replace.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_touch.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_upsert.cxx +4 -4
- data/ext/couchbase/core/protocol/datatype.hxx +118 -1
- data/ext/couchbase/core/protocol/frame_info_utils.cxx +1 -1
- data/ext/couchbase/core/protocol/magic.hxx +4 -0
- data/ext/couchbase/core/protocol/magic_fmt.hxx +3 -0
- data/ext/couchbase/core/protocol/server_request.hxx +3 -1
- data/ext/couchbase/core/protocol/status.cxx +1 -1
- data/ext/couchbase/core/protostellar/analytics_converter.hxx +171 -0
- data/ext/couchbase/core/protostellar/bucket_admin_converter.hxx +301 -0
- data/ext/couchbase/core/protostellar/collection_admin_converter.hxx +92 -0
- data/ext/couchbase/core/protostellar/component.cxx +2445 -0
- data/ext/couchbase/core/protostellar/component.hxx +391 -0
- data/ext/couchbase/core/{columnar/bootstrap_notification_subscriber.hxx → protostellar/compression_settings.hxx} +11 -10
- data/ext/couchbase/core/protostellar/credentials.cxx +233 -0
- data/ext/couchbase/core/protostellar/credentials.hxx +88 -0
- data/ext/couchbase/core/protostellar/dispatcher.cxx +57 -0
- data/ext/couchbase/core/protostellar/dispatcher.hxx +482 -0
- data/ext/couchbase/core/protostellar/error_utils.cxx +293 -0
- data/ext/couchbase/core/protostellar/error_utils.hxx +97 -0
- data/ext/couchbase/core/protostellar/json_payload.hxx +49 -0
- data/ext/couchbase/core/protostellar/kv_converter.cxx +70 -0
- data/ext/couchbase/core/protostellar/kv_converter.hxx +600 -0
- data/ext/couchbase/core/protostellar/query_converter.hxx +265 -0
- data/ext/couchbase/core/protostellar/query_index_admin_converter.hxx +291 -0
- data/ext/couchbase/core/protostellar/query_proto.hxx +73 -0
- data/ext/couchbase/core/protostellar/search_converter.hxx +244 -0
- data/ext/couchbase/core/protostellar/search_index_admin_converter.hxx +156 -0
- data/ext/couchbase/core/protostellar/view_converter.hxx +158 -0
- data/ext/couchbase/core/query_stream.cxx +447 -0
- data/ext/couchbase/core/query_stream.hxx +141 -0
- data/ext/couchbase/core/query_stream_component.cxx +243 -0
- data/ext/couchbase/core/query_stream_component.hxx +68 -0
- data/ext/couchbase/core/range_scan_load_balancer.cxx +15 -8
- data/ext/couchbase/core/range_scan_orchestrator.cxx +15 -3
- data/ext/couchbase/core/response_handler.hxx +41 -4
- data/ext/couchbase/core/row_streamer.cxx +332 -46
- data/ext/couchbase/core/row_streamer.hxx +31 -1
- data/ext/couchbase/core/row_streamer_options.hxx +55 -0
- data/ext/couchbase/core/sasl/client.h +3 -0
- data/ext/couchbase/core/search_scoring.hxx +66 -0
- data/ext/couchbase/core/stream_error_details.hxx +69 -0
- data/ext/couchbase/core/timeout_defaults.hxx +0 -1
- data/ext/couchbase/core/topology/capabilities.hxx +6 -0
- data/ext/couchbase/core/topology/capabilities_fmt.hxx +3 -0
- data/ext/couchbase/core/topology/configuration.cxx +21 -6
- data/ext/couchbase/core/topology/configuration.hxx +29 -8
- data/ext/couchbase/core/topology/configuration_json.hxx +3 -0
- data/ext/couchbase/core/topology/error_map_json.hxx +3 -1
- data/ext/couchbase/core/tracing/threshold_logging_tracer.cxx +70 -4
- data/ext/couchbase/core/tracing/threshold_logging_tracer.hxx +10 -0
- data/ext/couchbase/core/transactions/active_transaction_record.cxx +0 -34
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +108 -63
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +19 -2
- data/ext/couchbase/core/transactions/error_list.hxx +2 -2
- data/ext/couchbase/core/transactions/get_multi_fetch.hxx +160 -0
- data/ext/couchbase/core/transactions/get_multi_orchestrator.cxx +326 -125
- data/ext/couchbase/core/transactions/get_multi_transaction_id.hxx +62 -0
- data/ext/couchbase/core/transactions/internal/atr_entry.hxx +22 -2
- data/ext/couchbase/core/transactions/internal/transaction_context.hxx +2 -2
- data/ext/couchbase/core/transactions/internal/transactions_cleanup.hxx +23 -1
- data/ext/couchbase/core/transactions/internal/utils.hxx +50 -14
- data/ext/couchbase/core/transactions/staged_mutation.cxx +23 -18
- data/ext/couchbase/core/transactions/staged_mutation.hxx +15 -4
- data/ext/couchbase/core/transactions/transaction_context.cxx +55 -40
- data/ext/couchbase/core/transactions/transaction_get_result.hxx +16 -0
- data/ext/couchbase/core/transactions/transactions.cxx +3 -55
- data/ext/couchbase/core/transactions/transactions_cleanup.cxx +165 -72
- data/ext/couchbase/core/transactions/transactions_config.cxx +0 -11
- data/ext/couchbase/core/transactions/utils.cxx +10 -0
- data/ext/couchbase/core/transactions/waitable_op_list.hxx +2 -2
- data/ext/couchbase/core/transactions.hxx +9 -9
- data/ext/couchbase/core/utils/byteswap.hxx +166 -9
- data/ext/couchbase/core/utils/connection_string.cxx +50 -85
- data/ext/couchbase/core/utils/connection_string.hxx +15 -0
- data/ext/couchbase/core/{columnar/backoff_calculator.hxx → utils/deadline.hxx} +13 -13
- data/ext/couchbase/core/utils/duration_parser.cxx +1 -1
- data/ext/couchbase/core/utils/json_streaming_lexer.cxx +48 -5
- data/ext/couchbase/core/utils/json_streaming_lexer.hxx +4 -1
- data/ext/couchbase/core/utils/movable_function.hxx +301 -52
- data/ext/couchbase/core/utils/name_codec.hxx +154 -11
- data/ext/couchbase/core/{columnar/retry_info.hxx → utils/process_id.hxx} +18 -13
- data/ext/couchbase/core/utils/url_codec.cxx +12 -51
- data/ext/couchbase/core/websocket_codec.cxx +13 -37
- data/ext/couchbase/couchbase/analytics_options.hxx +21 -10
- data/ext/couchbase/couchbase/analytics_row.hxx +105 -0
- data/ext/couchbase/couchbase/analytics_stream_result.hxx +266 -0
- data/ext/couchbase/couchbase/boolean_query.hxx +3 -3
- data/ext/couchbase/couchbase/bucket.hxx +57 -0
- data/ext/couchbase/couchbase/cluster.hxx +183 -5
- data/ext/couchbase/{core/columnar/security_options.hxx → couchbase/cluster_state.hxx} +18 -14
- data/ext/couchbase/couchbase/codec/lenient_json_transcoder.hxx +69 -0
- data/ext/couchbase/couchbase/collection.hxx +234 -14
- data/ext/couchbase/couchbase/common_durability_options.hxx +18 -3
- data/ext/couchbase/couchbase/conjunction_query.hxx +1 -1
- data/ext/couchbase/couchbase/create_dataset_analytics_options.hxx +6 -1
- data/ext/couchbase/couchbase/date_range_query.hxx +2 -2
- data/ext/couchbase/couchbase/decrement_options.hxx +1 -1
- data/ext/couchbase/couchbase/disjunction_query.hxx +1 -1
- data/ext/couchbase/couchbase/error.hxx +32 -0
- data/ext/couchbase/couchbase/error_codes.hxx +33 -1
- data/ext/couchbase/couchbase/geo_bounding_box_query.hxx +1 -1
- data/ext/couchbase/couchbase/geo_distance_query.hxx +1 -1
- data/ext/couchbase/couchbase/geo_polygon_query.hxx +1 -1
- data/ext/couchbase/couchbase/get_replica_options.hxx +68 -0
- data/ext/couchbase/couchbase/get_replica_result.hxx +5 -3
- data/ext/couchbase/couchbase/get_replica_strategy.hxx +161 -0
- data/ext/couchbase/couchbase/get_result.hxx +1 -0
- data/ext/couchbase/couchbase/increment_options.hxx +1 -1
- data/ext/couchbase/couchbase/insert_options.hxx +1 -1
- data/ext/couchbase/couchbase/match_phrase_query.hxx +1 -1
- data/ext/couchbase/couchbase/match_query.hxx +1 -1
- data/ext/couchbase/couchbase/mutate_in_options.hxx +3 -3
- data/ext/couchbase/couchbase/network_options.hxx +1 -1
- data/ext/couchbase/couchbase/node_id.hxx +42 -14
- data/ext/couchbase/couchbase/node_id_for_options.hxx +7 -1
- data/ext/couchbase/couchbase/node_ids_options.hxx +8 -2
- data/ext/couchbase/couchbase/numeric_range_query.hxx +1 -1
- data/ext/couchbase/couchbase/phrase_query.hxx +1 -1
- data/ext/couchbase/couchbase/prefix_query.hxx +1 -1
- data/ext/couchbase/couchbase/query_options.hxx +23 -12
- data/ext/couchbase/couchbase/query_row.hxx +111 -0
- data/ext/couchbase/couchbase/query_stream_result.hxx +302 -0
- data/ext/couchbase/couchbase/query_string_query.hxx +3 -3
- data/ext/couchbase/couchbase/regexp_query.hxx +1 -1
- data/ext/couchbase/couchbase/replace_options.hxx +3 -3
- data/ext/couchbase/couchbase/result.hxx +14 -3
- data/ext/couchbase/couchbase/scan_result_item.hxx +1 -0
- data/ext/couchbase/couchbase/scope.hxx +85 -2
- data/ext/couchbase/couchbase/search_options.hxx +58 -8
- data/ext/couchbase/couchbase/search_scoring.hxx +94 -0
- data/ext/couchbase/couchbase/search_scoring_none.hxx +51 -0
- data/ext/couchbase/couchbase/search_scoring_reciprocal_rank_fusion.hxx +88 -0
- data/ext/couchbase/couchbase/search_scoring_relative_score_fusion.hxx +70 -0
- data/ext/couchbase/couchbase/term_range_query.hxx +1 -1
- data/ext/couchbase/couchbase/tracing/request_span.hxx +46 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_result.hxx +23 -21
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_result.hxx +24 -19
- data/ext/couchbase/couchbase/transactions/transaction_get_result.hxx +17 -3
- data/ext/couchbase/couchbase/transactions/transactions_config.hxx +4 -2
- data/ext/couchbase/couchbase/transactions.hxx +27 -18
- data/ext/couchbase/couchbase/upsert_options.hxx +3 -3
- data/ext/couchbase/couchbase/vector_query.hxx +1 -1
- data/ext/couchbase/couchbase/wait_until_ready_options.hxx +111 -0
- data/ext/couchbase/couchbase/wildcard_query.hxx +1 -1
- data/ext/extconf.rb +15 -10
- data/ext/rcb_analytics.cxx +82 -102
- data/ext/rcb_backend.cxx +42 -36
- data/ext/rcb_backend.hxx +2 -0
- data/ext/rcb_buckets.cxx +47 -59
- data/ext/rcb_collections.cxx +42 -52
- data/ext/rcb_crud.cxx +345 -224
- data/ext/rcb_diagnostics.cxx +117 -27
- data/ext/rcb_exceptions.cxx +152 -99
- data/ext/rcb_exceptions.hxx +25 -0
- data/ext/rcb_extras.cxx +18 -19
- data/ext/rcb_hdr_histogram.cxx +19 -4
- data/ext/rcb_logger.cxx +202 -27
- data/ext/rcb_logger.hxx +12 -0
- data/ext/rcb_multi.cxx +40 -40
- data/ext/rcb_observability.cxx +7 -5
- data/ext/rcb_query.cxx +99 -142
- data/ext/rcb_range_scan.cxx +41 -35
- data/ext/rcb_search.cxx +98 -99
- data/ext/rcb_users.cxx +36 -56
- data/ext/rcb_utils.cxx +100 -37
- data/ext/rcb_utils.hxx +287 -33
- data/ext/rcb_version.cxx +1 -1
- data/ext/rcb_views.cxx +55 -51
- data/lib/active_support/cache/couchbase_store.rb +77 -12
- data/lib/couchbase/bucket.rb +20 -0
- data/lib/couchbase/cluster.rb +17 -0
- data/lib/couchbase/collection.rb +36 -1
- data/lib/couchbase/errors.rb +18 -0
- data/lib/couchbase/fork_hooks.rb +16 -7
- data/lib/couchbase/get_replica_strategy.rb +89 -0
- data/lib/couchbase/logger.rb +1 -1
- data/lib/couchbase/management/analytics_index_manager.rb +15 -15
- data/lib/couchbase/management/bucket_manager.rb +6 -6
- data/lib/couchbase/management/collection_manager.rb +6 -6
- data/lib/couchbase/management/query_index_manager.rb +7 -7
- data/lib/couchbase/management/search_index_manager.rb +13 -13
- data/lib/couchbase/management/user_manager.rb +10 -10
- data/lib/couchbase/management/view_index_manager.rb +5 -5
- data/lib/couchbase/options.rb +174 -42
- data/lib/couchbase/protostellar/bucket.rb +4 -0
- data/lib/couchbase/protostellar/cluster.rb +4 -0
- data/lib/couchbase/protostellar/collection.rb +4 -0
- data/lib/couchbase/protostellar/error_handling.rb +2 -1
- data/lib/couchbase/protostellar/request.rb +1 -0
- data/lib/couchbase/protostellar/request_generator/kv.rb +16 -2
- data/lib/couchbase/protostellar/request_generator/search.rb +17 -1
- data/lib/couchbase/protostellar/retry/orchestrator.rb +3 -2
- data/lib/couchbase/protostellar/retry/strategies/fail_fast.rb +33 -0
- data/lib/couchbase/protostellar/retry/strategies.rb +1 -0
- data/lib/couchbase/search_options.rb +95 -6
- data/lib/couchbase/version.rb +1 -1
- metadata +91 -33
- data/ext/0001-fix-build-for-mingw-w64-ucrt-x86_64-toolchain.patch +0 -40
- data/ext/couchbase/core/columnar/agent.hxx +0 -71
- data/ext/couchbase/core/columnar/agent_config.hxx +0 -59
- data/ext/couchbase/core/columnar/background_bootstrap_listener.hxx +0 -42
- data/ext/couchbase/core/columnar/backoff_calculator.cxx +0 -62
- data/ext/couchbase/core/columnar/columnar_agent.cxx +0 -147
- data/ext/couchbase/core/columnar/columnar_agent_config.cxx +0 -48
- data/ext/couchbase/core/columnar/columnar_error.cxx +0 -51
- data/ext/couchbase/core/columnar/database_management_options.hxx +0 -56
- data/ext/couchbase/core/columnar/error.hxx +0 -51
- data/ext/couchbase/core/columnar/error_codes.cxx +0 -107
- data/ext/couchbase/core/columnar/error_codes.hxx +0 -75
- data/ext/couchbase/core/columnar/management_component.cxx +0 -300
- data/ext/couchbase/core/columnar/management_component.hxx +0 -56
- data/ext/couchbase/core/columnar/query_component.cxx +0 -523
- data/ext/couchbase/core/columnar/query_component.hxx +0 -57
- data/ext/couchbase/core/columnar/query_options.hxx +0 -59
- data/ext/couchbase/core/columnar/query_result.cxx +0 -130
- data/ext/couchbase/core/columnar/query_result.hxx +0 -78
- data/ext/couchbase/core/io/config_tracker.cxx +0 -687
- data/ext/couchbase/core/io/config_tracker.hxx +0 -123
data/ext/rcb_range_scan.cxx
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
#include <couchbase/cluster.hxx>
|
|
19
|
+
|
|
18
20
|
#include <core/agent_group.hxx>
|
|
19
21
|
#include <core/agent_group_config.hxx>
|
|
20
22
|
#include <core/cluster.hxx>
|
|
@@ -40,6 +42,10 @@ namespace couchbase::ruby
|
|
|
40
42
|
namespace
|
|
41
43
|
{
|
|
42
44
|
struct cb_core_scan_result_data {
|
|
45
|
+
// The orchestrator behind scan_result holds the cluster's io_context by reference. This copy
|
|
46
|
+
// keeps the io_context alive until scan_result is destroyed, even after Cluster#disconnect or
|
|
47
|
+
// when the GC frees the backend first.
|
|
48
|
+
std::unique_ptr<couchbase::cluster> cluster;
|
|
43
49
|
std::unique_ptr<couchbase::core::scan_result> scan_result;
|
|
44
50
|
};
|
|
45
51
|
|
|
@@ -57,6 +63,7 @@ cb_CoreScanResult_free(void* ptr)
|
|
|
57
63
|
data->scan_result->cancel();
|
|
58
64
|
}
|
|
59
65
|
data->scan_result.reset();
|
|
66
|
+
data->cluster.reset();
|
|
60
67
|
ruby_xfree(data);
|
|
61
68
|
}
|
|
62
69
|
|
|
@@ -143,10 +150,8 @@ cb_CoreScanResult_next_item(VALUE self)
|
|
|
143
150
|
}
|
|
144
151
|
return res;
|
|
145
152
|
} catch (const std::system_error& se) {
|
|
146
|
-
|
|
153
|
+
throw ruby_exception(cb_map_error_code(
|
|
147
154
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
148
|
-
} catch (const ruby_exception& e) {
|
|
149
|
-
rb_exc_raise(e.exception_object());
|
|
150
155
|
}
|
|
151
156
|
return Qnil;
|
|
152
157
|
}
|
|
@@ -161,14 +166,15 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
161
166
|
VALUE scan_type,
|
|
162
167
|
VALUE options)
|
|
163
168
|
{
|
|
164
|
-
auto
|
|
169
|
+
auto public_cluster = cb_backend_to_public_api_cluster(self);
|
|
170
|
+
auto cluster = couchbase::core::get_core_cluster(public_cluster);
|
|
165
171
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
cb_check_type(bucket, T_STRING);
|
|
173
|
+
cb_check_type(scope, T_STRING);
|
|
174
|
+
cb_check_type(collection, T_STRING);
|
|
175
|
+
cb_check_type(scan_type, T_HASH);
|
|
170
176
|
if (!NIL_P(options)) {
|
|
171
|
-
|
|
177
|
+
cb_check_type(options, T_HASH);
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
try {
|
|
@@ -201,7 +207,7 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
201
207
|
case T_BIGNUM:
|
|
202
208
|
break;
|
|
203
209
|
default:
|
|
204
|
-
|
|
210
|
+
throw ruby_exception(rb_eArgError, "partition_uuid must be an Integer");
|
|
205
211
|
}
|
|
206
212
|
VALUE sequence_number = rb_hash_aref(token, rb_id2sym(rb_intern("sequence_number")));
|
|
207
213
|
switch (TYPE(sequence_number)) {
|
|
@@ -209,12 +215,12 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
209
215
|
case T_BIGNUM:
|
|
210
216
|
break;
|
|
211
217
|
default:
|
|
212
|
-
|
|
218
|
+
throw ruby_exception(rb_eArgError, "sequence_number must be an Integer");
|
|
213
219
|
}
|
|
214
220
|
core_mut_state.tokens.emplace_back(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
gsl::narrow_cast<std::uint16_t>(
|
|
221
|
+
cb_num2ull(partition_uuid),
|
|
222
|
+
cb_num2ull(sequence_number),
|
|
223
|
+
gsl::narrow_cast<std::uint16_t>(cb_num2uint(partition_id)),
|
|
218
224
|
cb_string_new(bucket_name));
|
|
219
225
|
}
|
|
220
226
|
|
|
@@ -232,13 +238,11 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
232
238
|
auto err = agent_group.open_bucket(bucket_name);
|
|
233
239
|
if (err) {
|
|
234
240
|
cb_throw_error_code(err, "unable to open bucket for range scan");
|
|
235
|
-
return Qnil;
|
|
236
241
|
}
|
|
237
242
|
auto agent = agent_group.get_agent(bucket_name);
|
|
238
243
|
if (!agent.has_value()) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
return Qnil;
|
|
244
|
+
throw ruby_exception(exc_couchbase_error(),
|
|
245
|
+
"Cannot perform scan operation. Unable to get operation agent");
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
// Getting the vbucket map
|
|
@@ -253,18 +257,17 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
253
257
|
});
|
|
254
258
|
auto config = cb_wait_for_future(f);
|
|
255
259
|
if (!config.has_value()) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
return Qnil;
|
|
260
|
+
throw ruby_exception(exc_couchbase_error(),
|
|
261
|
+
"Cannot perform scan operation. Unable to get bucket configuration");
|
|
259
262
|
}
|
|
260
263
|
if (!config->capabilities.supports_range_scan()) {
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
throw ruby_exception(exc_feature_not_available(),
|
|
265
|
+
"Server does not support key-value scan operations");
|
|
263
266
|
}
|
|
264
267
|
auto vbucket_map = config->vbmap;
|
|
265
268
|
if (!vbucket_map || vbucket_map->empty()) {
|
|
266
|
-
|
|
267
|
-
|
|
269
|
+
throw ruby_exception(exc_couchbase_error(),
|
|
270
|
+
"Cannot perform scan operation. Unable to get vbucket map");
|
|
268
271
|
}
|
|
269
272
|
|
|
270
273
|
// Constructing the scan type
|
|
@@ -273,7 +276,7 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
273
276
|
couchbase::core::prefix_scan,
|
|
274
277
|
couchbase::core::sampling_scan>
|
|
275
278
|
core_scan_type{};
|
|
276
|
-
ID scan_type_id =
|
|
279
|
+
ID scan_type_id = cb_sym2id(rb_hash_aref(scan_type, rb_id2sym(rb_intern("scan_type"))));
|
|
277
280
|
if (scan_type_id == rb_intern("range")) {
|
|
278
281
|
auto range_scan = couchbase::core::range_scan{};
|
|
279
282
|
|
|
@@ -281,13 +284,13 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
281
284
|
VALUE to_hash = rb_hash_aref(scan_type, rb_id2sym(rb_intern("to")));
|
|
282
285
|
|
|
283
286
|
if (!NIL_P(from_hash)) {
|
|
284
|
-
|
|
287
|
+
cb_check_type(from_hash, T_HASH);
|
|
285
288
|
range_scan.from = couchbase::core::scan_term{};
|
|
286
289
|
cb_extract_option_string(range_scan.from->term, from_hash, "term");
|
|
287
290
|
cb_extract_option_bool(range_scan.from->exclusive, from_hash, "exclusive");
|
|
288
291
|
}
|
|
289
292
|
if (!NIL_P(to_hash)) {
|
|
290
|
-
|
|
293
|
+
cb_check_type(to_hash, T_HASH);
|
|
291
294
|
range_scan.to = couchbase::core::scan_term{};
|
|
292
295
|
cb_extract_option_string(range_scan.to->term, to_hash, "term");
|
|
293
296
|
cb_extract_option_bool(range_scan.to->exclusive, to_hash, "exclusive");
|
|
@@ -303,7 +306,7 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
303
306
|
cb_extract_option_number(sampling_scan.seed, scan_type, "seed");
|
|
304
307
|
core_scan_type = sampling_scan;
|
|
305
308
|
} else {
|
|
306
|
-
|
|
309
|
+
throw ruby_exception(exc_invalid_argument(), "Invalid scan operation type");
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
auto orchestrator = couchbase::core::range_scan_orchestrator(cluster.io_context(),
|
|
@@ -323,19 +326,21 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
323
326
|
// Wrap core scan_result inside Ruby ScanResult
|
|
324
327
|
// Creating a Ruby CoreScanResult object *after* checking that no error occurred during
|
|
325
328
|
// orchestrator.scan()
|
|
326
|
-
VALUE core_scan_result_obj =
|
|
329
|
+
VALUE core_scan_result_obj = Qnil;
|
|
330
|
+
cb_protect([&core_scan_result_obj] {
|
|
331
|
+
core_scan_result_obj = rb_class_new_instance(0, nullptr, cCoreScanResult);
|
|
332
|
+
});
|
|
327
333
|
rb_ivar_set(core_scan_result_obj, rb_intern("@backend"), self);
|
|
328
334
|
cb_core_scan_result_data* data = nullptr;
|
|
329
335
|
TypedData_Get_Struct(
|
|
330
336
|
core_scan_result_obj, cb_core_scan_result_data, &cb_core_scan_result_type, data);
|
|
337
|
+
data->cluster = std::make_unique<couchbase::cluster>(std::move(public_cluster));
|
|
331
338
|
data->scan_result = std::make_unique<couchbase::core::scan_result>(resp.value());
|
|
332
339
|
return core_scan_result_obj;
|
|
333
340
|
|
|
334
341
|
} catch (const std::system_error& se) {
|
|
335
|
-
|
|
342
|
+
throw ruby_exception(cb_map_error_code(
|
|
336
343
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
337
|
-
} catch (const ruby_exception& e) {
|
|
338
|
-
rb_exc_raise(e.exception_object());
|
|
339
344
|
}
|
|
340
345
|
return Qnil;
|
|
341
346
|
}
|
|
@@ -345,11 +350,12 @@ cb_Backend_document_scan_create(VALUE self,
|
|
|
345
350
|
void
|
|
346
351
|
init_range_scan(VALUE mCouchbase, VALUE cBackend)
|
|
347
352
|
{
|
|
348
|
-
rb_define_method(
|
|
353
|
+
rb_define_method(
|
|
354
|
+
cBackend, "document_scan_create", cb_method<cb_Backend_document_scan_create>::invoke, 5);
|
|
349
355
|
|
|
350
356
|
cCoreScanResult = rb_define_class_under(mCouchbase, "CoreScanResult", rb_cObject);
|
|
351
357
|
rb_define_alloc_func(cCoreScanResult, cb_CoreScanResult_allocate);
|
|
352
|
-
rb_define_method(cCoreScanResult, "next_item", cb_CoreScanResult_next_item, 0);
|
|
358
|
+
rb_define_method(cCoreScanResult, "next_item", cb_method<cb_CoreScanResult_next_item>::invoke, 0);
|
|
353
359
|
rb_define_method(cCoreScanResult, "cancelled?", cb_CoreScanResult_is_cancelled, 0);
|
|
354
360
|
rb_define_method(cCoreScanResult, "cancel", cb_CoreScanResult_cancel, 0);
|
|
355
361
|
}
|
data/ext/rcb_search.cxx
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
#include <core/operations/management/search_index_get_documents_count.hxx>
|
|
30
30
|
#include <core/operations/management/search_index_get_stats.hxx>
|
|
31
31
|
#include <core/operations/management/search_index_upsert.hxx>
|
|
32
|
+
#include <core/search_scoring.hxx>
|
|
32
33
|
|
|
33
34
|
#include <gsl/narrow>
|
|
34
35
|
#include <spdlog/fmt/bundled/core.h>
|
|
@@ -115,10 +116,8 @@ cb_Backend_search_index_get_all(VALUE self,
|
|
|
115
116
|
rb_hash_aset(res, rb_id2sym(rb_intern("indexes")), indexes);
|
|
116
117
|
return res;
|
|
117
118
|
} catch (const std::system_error& se) {
|
|
118
|
-
|
|
119
|
+
throw ruby_exception(cb_map_error_code(
|
|
119
120
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
120
|
-
} catch (const ruby_exception& e) {
|
|
121
|
-
rb_exc_raise(e.exception_object());
|
|
122
121
|
}
|
|
123
122
|
return Qnil;
|
|
124
123
|
}
|
|
@@ -133,7 +132,7 @@ cb_Backend_search_index_get(VALUE self,
|
|
|
133
132
|
{
|
|
134
133
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
135
134
|
|
|
136
|
-
|
|
135
|
+
cb_check_type(index_name, T_STRING);
|
|
137
136
|
|
|
138
137
|
try {
|
|
139
138
|
core::operations::management::search_index_get_request req{};
|
|
@@ -168,10 +167,8 @@ cb_Backend_search_index_get(VALUE self,
|
|
|
168
167
|
cb_extract_search_index(res, resp.index);
|
|
169
168
|
return res;
|
|
170
169
|
} catch (const std::system_error& se) {
|
|
171
|
-
|
|
170
|
+
throw ruby_exception(cb_map_error_code(
|
|
172
171
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
173
|
-
} catch (const ruby_exception& e) {
|
|
174
|
-
rb_exc_raise(e.exception_object());
|
|
175
172
|
}
|
|
176
173
|
return Qnil;
|
|
177
174
|
}
|
|
@@ -186,7 +183,7 @@ cb_Backend_search_index_upsert(VALUE self,
|
|
|
186
183
|
{
|
|
187
184
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
188
185
|
|
|
189
|
-
|
|
186
|
+
cb_check_type(index_definition, T_HASH);
|
|
190
187
|
|
|
191
188
|
try {
|
|
192
189
|
core::operations::management::search_index_upsert_request req{};
|
|
@@ -271,10 +268,8 @@ cb_Backend_search_index_upsert(VALUE self,
|
|
|
271
268
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
272
269
|
return res;
|
|
273
270
|
} catch (const std::system_error& se) {
|
|
274
|
-
|
|
271
|
+
throw ruby_exception(cb_map_error_code(
|
|
275
272
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
276
|
-
} catch (const ruby_exception& e) {
|
|
277
|
-
rb_exc_raise(e.exception_object());
|
|
278
273
|
}
|
|
279
274
|
return Qnil;
|
|
280
275
|
}
|
|
@@ -289,7 +284,7 @@ cb_Backend_search_index_drop(VALUE self,
|
|
|
289
284
|
{
|
|
290
285
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
291
286
|
|
|
292
|
-
|
|
287
|
+
cb_check_type(index_name, T_STRING);
|
|
293
288
|
|
|
294
289
|
try {
|
|
295
290
|
core::operations::management::search_index_drop_request req{};
|
|
@@ -325,10 +320,8 @@ cb_Backend_search_index_drop(VALUE self,
|
|
|
325
320
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
326
321
|
return res;
|
|
327
322
|
} catch (const std::system_error& se) {
|
|
328
|
-
|
|
323
|
+
throw ruby_exception(cb_map_error_code(
|
|
329
324
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
330
|
-
} catch (const ruby_exception& e) {
|
|
331
|
-
rb_exc_raise(e.exception_object());
|
|
332
325
|
}
|
|
333
326
|
return Qnil;
|
|
334
327
|
}
|
|
@@ -343,7 +336,7 @@ cb_Backend_search_index_get_documents_count(VALUE self,
|
|
|
343
336
|
{
|
|
344
337
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
345
338
|
|
|
346
|
-
|
|
339
|
+
cb_check_type(index_name, T_STRING);
|
|
347
340
|
|
|
348
341
|
try {
|
|
349
342
|
core::operations::management::search_index_get_documents_count_request req{};
|
|
@@ -385,10 +378,8 @@ cb_Backend_search_index_get_documents_count(VALUE self,
|
|
|
385
378
|
rb_hash_aset(res, rb_id2sym(rb_intern("count")), ULL2NUM(resp.count));
|
|
386
379
|
return res;
|
|
387
380
|
} catch (const std::system_error& se) {
|
|
388
|
-
|
|
381
|
+
throw ruby_exception(cb_map_error_code(
|
|
389
382
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
390
|
-
} catch (const ruby_exception& e) {
|
|
391
|
-
rb_exc_raise(e.exception_object());
|
|
392
383
|
}
|
|
393
384
|
return Qnil;
|
|
394
385
|
}
|
|
@@ -401,7 +392,7 @@ cb_Backend_search_index_get_stats(VALUE self,
|
|
|
401
392
|
{
|
|
402
393
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
403
394
|
|
|
404
|
-
|
|
395
|
+
cb_check_type(index_name, T_STRING);
|
|
405
396
|
|
|
406
397
|
try {
|
|
407
398
|
core::operations::management::search_index_get_stats_request req{};
|
|
@@ -428,10 +419,8 @@ cb_Backend_search_index_get_stats(VALUE self,
|
|
|
428
419
|
}
|
|
429
420
|
return cb_str_new(resp.stats);
|
|
430
421
|
} catch (const std::system_error& se) {
|
|
431
|
-
|
|
422
|
+
throw ruby_exception(cb_map_error_code(
|
|
432
423
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
433
|
-
} catch (const ruby_exception& e) {
|
|
434
|
-
rb_exc_raise(e.exception_object());
|
|
435
424
|
}
|
|
436
425
|
return Qnil;
|
|
437
426
|
}
|
|
@@ -457,10 +446,8 @@ cb_Backend_search_get_stats(VALUE self, VALUE timeout, VALUE observability_handl
|
|
|
457
446
|
}
|
|
458
447
|
return cb_str_new(resp.stats);
|
|
459
448
|
} catch (const std::system_error& se) {
|
|
460
|
-
|
|
449
|
+
throw ruby_exception(cb_map_error_code(
|
|
461
450
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
462
|
-
} catch (const ruby_exception& e) {
|
|
463
|
-
rb_exc_raise(e.exception_object());
|
|
464
451
|
}
|
|
465
452
|
return Qnil;
|
|
466
453
|
}
|
|
@@ -475,7 +462,7 @@ cb_Backend_search_index_pause_ingest(VALUE self,
|
|
|
475
462
|
{
|
|
476
463
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
477
464
|
|
|
478
|
-
|
|
465
|
+
cb_check_type(index_name, T_STRING);
|
|
479
466
|
|
|
480
467
|
try {
|
|
481
468
|
core::operations::management::search_index_control_ingest_request req{};
|
|
@@ -514,10 +501,8 @@ cb_Backend_search_index_pause_ingest(VALUE self,
|
|
|
514
501
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
515
502
|
return res;
|
|
516
503
|
} catch (const std::system_error& se) {
|
|
517
|
-
|
|
504
|
+
throw ruby_exception(cb_map_error_code(
|
|
518
505
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
519
|
-
} catch (const ruby_exception& e) {
|
|
520
|
-
rb_exc_raise(e.exception_object());
|
|
521
506
|
}
|
|
522
507
|
return Qnil;
|
|
523
508
|
}
|
|
@@ -532,7 +517,7 @@ cb_Backend_search_index_resume_ingest(VALUE self,
|
|
|
532
517
|
{
|
|
533
518
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
534
519
|
|
|
535
|
-
|
|
520
|
+
cb_check_type(index_name, T_STRING);
|
|
536
521
|
|
|
537
522
|
try {
|
|
538
523
|
core::operations::management::search_index_control_ingest_request req{};
|
|
@@ -571,10 +556,8 @@ cb_Backend_search_index_resume_ingest(VALUE self,
|
|
|
571
556
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
572
557
|
return res;
|
|
573
558
|
} catch (const std::system_error& se) {
|
|
574
|
-
|
|
559
|
+
throw ruby_exception(cb_map_error_code(
|
|
575
560
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
576
|
-
} catch (const ruby_exception& e) {
|
|
577
|
-
rb_exc_raise(e.exception_object());
|
|
578
561
|
}
|
|
579
562
|
return Qnil;
|
|
580
563
|
}
|
|
@@ -589,7 +572,7 @@ cb_Backend_search_index_allow_querying(VALUE self,
|
|
|
589
572
|
{
|
|
590
573
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
591
574
|
|
|
592
|
-
|
|
575
|
+
cb_check_type(index_name, T_STRING);
|
|
593
576
|
|
|
594
577
|
try {
|
|
595
578
|
core::operations::management::search_index_control_query_request req{};
|
|
@@ -628,10 +611,8 @@ cb_Backend_search_index_allow_querying(VALUE self,
|
|
|
628
611
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
629
612
|
return res;
|
|
630
613
|
} catch (const std::system_error& se) {
|
|
631
|
-
|
|
614
|
+
throw ruby_exception(cb_map_error_code(
|
|
632
615
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
633
|
-
} catch (const ruby_exception& e) {
|
|
634
|
-
rb_exc_raise(e.exception_object());
|
|
635
616
|
}
|
|
636
617
|
return Qnil;
|
|
637
618
|
}
|
|
@@ -646,7 +627,7 @@ cb_Backend_search_index_disallow_querying(VALUE self,
|
|
|
646
627
|
{
|
|
647
628
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
648
629
|
|
|
649
|
-
|
|
630
|
+
cb_check_type(index_name, T_STRING);
|
|
650
631
|
|
|
651
632
|
try {
|
|
652
633
|
core::operations::management::search_index_control_query_request req{};
|
|
@@ -685,10 +666,8 @@ cb_Backend_search_index_disallow_querying(VALUE self,
|
|
|
685
666
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
686
667
|
return res;
|
|
687
668
|
} catch (const std::system_error& se) {
|
|
688
|
-
|
|
669
|
+
throw ruby_exception(cb_map_error_code(
|
|
689
670
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
690
|
-
} catch (const ruby_exception& e) {
|
|
691
|
-
rb_exc_raise(e.exception_object());
|
|
692
671
|
}
|
|
693
672
|
return Qnil;
|
|
694
673
|
}
|
|
@@ -703,7 +682,7 @@ cb_Backend_search_index_freeze_plan(VALUE self,
|
|
|
703
682
|
{
|
|
704
683
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
705
684
|
|
|
706
|
-
|
|
685
|
+
cb_check_type(index_name, T_STRING);
|
|
707
686
|
|
|
708
687
|
try {
|
|
709
688
|
core::operations::management::search_index_control_plan_freeze_request req{};
|
|
@@ -741,10 +720,8 @@ cb_Backend_search_index_freeze_plan(VALUE self,
|
|
|
741
720
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
742
721
|
return res;
|
|
743
722
|
} catch (const std::system_error& se) {
|
|
744
|
-
|
|
723
|
+
throw ruby_exception(cb_map_error_code(
|
|
745
724
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
746
|
-
} catch (const ruby_exception& e) {
|
|
747
|
-
rb_exc_raise(e.exception_object());
|
|
748
725
|
}
|
|
749
726
|
return Qnil;
|
|
750
727
|
}
|
|
@@ -759,7 +736,7 @@ cb_Backend_search_index_unfreeze_plan(VALUE self,
|
|
|
759
736
|
{
|
|
760
737
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
761
738
|
|
|
762
|
-
|
|
739
|
+
cb_check_type(index_name, T_STRING);
|
|
763
740
|
|
|
764
741
|
try {
|
|
765
742
|
core::operations::management::search_index_control_plan_freeze_request req{};
|
|
@@ -798,10 +775,8 @@ cb_Backend_search_index_unfreeze_plan(VALUE self,
|
|
|
798
775
|
rb_hash_aset(res, rb_id2sym(rb_intern("status")), cb_str_new(resp.status));
|
|
799
776
|
return res;
|
|
800
777
|
} catch (const std::system_error& se) {
|
|
801
|
-
|
|
778
|
+
throw ruby_exception(cb_map_error_code(
|
|
802
779
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
803
|
-
} catch (const ruby_exception& e) {
|
|
804
|
-
rb_exc_raise(e.exception_object());
|
|
805
780
|
}
|
|
806
781
|
return Qnil;
|
|
807
782
|
}
|
|
@@ -817,8 +792,8 @@ cb_Backend_search_index_analyze_document(VALUE self,
|
|
|
817
792
|
{
|
|
818
793
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
819
794
|
|
|
820
|
-
|
|
821
|
-
|
|
795
|
+
cb_check_type(index_name, T_STRING);
|
|
796
|
+
cb_check_type(encoded_document, T_STRING);
|
|
822
797
|
|
|
823
798
|
try {
|
|
824
799
|
core::operations::management::search_index_analyze_document_request req{};
|
|
@@ -861,29 +836,12 @@ cb_Backend_search_index_analyze_document(VALUE self,
|
|
|
861
836
|
rb_hash_aset(res, rb_id2sym(rb_intern("analysis")), cb_str_new(resp.analysis));
|
|
862
837
|
return res;
|
|
863
838
|
} catch (const std::system_error& se) {
|
|
864
|
-
|
|
839
|
+
throw ruby_exception(cb_map_error_code(
|
|
865
840
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
866
|
-
} catch (const ruby_exception& e) {
|
|
867
|
-
rb_exc_raise(e.exception_object());
|
|
868
841
|
}
|
|
869
842
|
return Qnil;
|
|
870
843
|
}
|
|
871
844
|
|
|
872
|
-
int
|
|
873
|
-
cb_for_each_raw_param(VALUE key, VALUE value, VALUE arg)
|
|
874
|
-
{
|
|
875
|
-
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
|
|
876
|
-
auto* preq = reinterpret_cast<core::operations::search_request*>(arg);
|
|
877
|
-
try {
|
|
878
|
-
cb_check_type(key, T_STRING);
|
|
879
|
-
cb_check_type(value, T_STRING);
|
|
880
|
-
} catch (const ruby_exception&) {
|
|
881
|
-
return ST_STOP;
|
|
882
|
-
}
|
|
883
|
-
preq->raw[cb_string_new(key)] = cb_string_new(value);
|
|
884
|
-
return ST_CONTINUE;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
845
|
VALUE
|
|
888
846
|
cb_Backend_document_search(VALUE self,
|
|
889
847
|
VALUE bucket,
|
|
@@ -896,10 +854,10 @@ cb_Backend_document_search(VALUE self,
|
|
|
896
854
|
{
|
|
897
855
|
auto cluster = cb_backend_to_core_api_cluster(self);
|
|
898
856
|
|
|
899
|
-
|
|
900
|
-
|
|
857
|
+
cb_check_type(index_name, T_STRING);
|
|
858
|
+
cb_check_type(query, T_STRING);
|
|
901
859
|
if (!NIL_P(options)) {
|
|
902
|
-
|
|
860
|
+
cb_check_type(options, T_HASH);
|
|
903
861
|
}
|
|
904
862
|
|
|
905
863
|
try {
|
|
@@ -926,6 +884,28 @@ cb_Backend_document_search(VALUE self,
|
|
|
926
884
|
cb_extract_option_bool(req.include_locations, options, "include_locations");
|
|
927
885
|
cb_extract_option_bool(req.show_request, options, "show_request");
|
|
928
886
|
|
|
887
|
+
if (VALUE scoring = rb_hash_aref(options, rb_id2sym(rb_intern("scoring"))); !NIL_P(scoring)) {
|
|
888
|
+
cb_check_type(scoring, T_HASH);
|
|
889
|
+
VALUE mode = rb_hash_aref(scoring, rb_id2sym(rb_intern("mode")));
|
|
890
|
+
cb_check_type(mode, T_SYMBOL);
|
|
891
|
+
VALUE params = rb_hash_aref(scoring, rb_id2sym(rb_intern("params")));
|
|
892
|
+
if (ID mode_type = rb_sym2id(mode); mode_type == rb_intern("none")) {
|
|
893
|
+
req.scoring = core::search_scoring_none{};
|
|
894
|
+
} else if (mode_type == rb_intern("reciprocal_rank_fusion")) {
|
|
895
|
+
core::search_scoring_reciprocal_rank_fusion rrf{};
|
|
896
|
+
cb_extract_option_number(rrf.rank_constant, params, "rank_constant");
|
|
897
|
+
cb_extract_option_number(rrf.window_size, params, "window_size");
|
|
898
|
+
req.scoring = rrf;
|
|
899
|
+
} else if (mode_type == rb_intern("relative_score_fusion")) {
|
|
900
|
+
core::search_scoring_relative_score_fusion rsf{};
|
|
901
|
+
cb_extract_option_number(rsf.window_size, params, "window_size");
|
|
902
|
+
req.scoring = rsf;
|
|
903
|
+
} else {
|
|
904
|
+
throw ruby_exception(rb_eArgError,
|
|
905
|
+
cb_sprintf("unknown search scoring mode: %+" PRIsVALUE, mode));
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
929
909
|
if (VALUE vector_options = rb_hash_aref(search_request, rb_id2sym(rb_intern("vector_search")));
|
|
930
910
|
!NIL_P(vector_options)) {
|
|
931
911
|
cb_check_type(vector_options, T_HASH);
|
|
@@ -1015,9 +995,9 @@ cb_Backend_document_search(VALUE self,
|
|
|
1015
995
|
default:
|
|
1016
996
|
throw ruby_exception(rb_eArgError, "sequence_number must be an Integer");
|
|
1017
997
|
}
|
|
1018
|
-
req.mutation_state.emplace_back(
|
|
1019
|
-
|
|
1020
|
-
gsl::narrow_cast<std::uint16_t>(
|
|
998
|
+
req.mutation_state.emplace_back(cb_num2ull(partition_uuid),
|
|
999
|
+
cb_num2ull(sequence_number),
|
|
1000
|
+
gsl::narrow_cast<std::uint16_t>(cb_num2uint(partition_id)),
|
|
1021
1001
|
cb_string_new(bucket_name));
|
|
1022
1002
|
}
|
|
1023
1003
|
}
|
|
@@ -1071,8 +1051,7 @@ cb_Backend_document_search(VALUE self,
|
|
|
1071
1051
|
if (VALUE raw_params = rb_hash_aref(options, rb_id2sym(rb_intern("raw_parameters")));
|
|
1072
1052
|
!NIL_P(raw_params)) {
|
|
1073
1053
|
cb_check_type(raw_params, T_HASH);
|
|
1074
|
-
|
|
1075
|
-
rb_hash_foreach(raw_params, cb_for_each_raw_param, reinterpret_cast<VALUE>(&req));
|
|
1054
|
+
cb_extract_string_hash(req.raw, raw_params, "raw_parameters");
|
|
1076
1055
|
}
|
|
1077
1056
|
|
|
1078
1057
|
auto parent_span = cb_create_parent_span(req, self);
|
|
@@ -1238,10 +1217,8 @@ cb_Backend_document_search(VALUE self,
|
|
|
1238
1217
|
|
|
1239
1218
|
return res;
|
|
1240
1219
|
} catch (const std::system_error& se) {
|
|
1241
|
-
|
|
1220
|
+
throw ruby_exception(cb_map_error_code(
|
|
1242
1221
|
se.code(), fmt::format("failed to perform {}: {}", __func__, se.what()), false));
|
|
1243
|
-
} catch (const ruby_exception& e) {
|
|
1244
|
-
rb_exc_raise(e.exception_object());
|
|
1245
1222
|
}
|
|
1246
1223
|
return Qnil;
|
|
1247
1224
|
}
|
|
@@ -1251,27 +1228,49 @@ cb_Backend_document_search(VALUE self,
|
|
|
1251
1228
|
void
|
|
1252
1229
|
init_search(VALUE cBackend)
|
|
1253
1230
|
{
|
|
1254
|
-
rb_define_method(cBackend, "document_search", cb_Backend_document_search, 7);
|
|
1255
|
-
|
|
1256
|
-
rb_define_method(cBackend, "search_get_stats", cb_Backend_search_get_stats, 2);
|
|
1257
|
-
rb_define_method(cBackend, "search_index_get_all", cb_Backend_search_index_get_all, 4);
|
|
1258
|
-
rb_define_method(cBackend, "search_index_get", cb_Backend_search_index_get, 5);
|
|
1259
|
-
rb_define_method(cBackend, "search_index_upsert", cb_Backend_search_index_upsert, 5);
|
|
1260
|
-
rb_define_method(cBackend, "search_index_drop", cb_Backend_search_index_drop, 5);
|
|
1261
|
-
rb_define_method(cBackend, "search_index_get_stats", cb_Backend_search_index_get_stats, 3);
|
|
1262
|
-
rb_define_method(
|
|
1263
|
-
cBackend, "search_index_get_documents_count", cb_Backend_search_index_get_documents_count, 5);
|
|
1264
|
-
rb_define_method(cBackend, "search_index_pause_ingest", cb_Backend_search_index_pause_ingest, 5);
|
|
1265
|
-
rb_define_method(
|
|
1266
|
-
cBackend, "search_index_resume_ingest", cb_Backend_search_index_resume_ingest, 5);
|
|
1231
|
+
rb_define_method(cBackend, "document_search", cb_method<cb_Backend_document_search>::invoke, 7);
|
|
1232
|
+
|
|
1233
|
+
rb_define_method(cBackend, "search_get_stats", cb_method<cb_Backend_search_get_stats>::invoke, 2);
|
|
1267
1234
|
rb_define_method(
|
|
1268
|
-
cBackend, "
|
|
1235
|
+
cBackend, "search_index_get_all", cb_method<cb_Backend_search_index_get_all>::invoke, 4);
|
|
1236
|
+
rb_define_method(cBackend, "search_index_get", cb_method<cb_Backend_search_index_get>::invoke, 5);
|
|
1269
1237
|
rb_define_method(
|
|
1270
|
-
cBackend, "
|
|
1271
|
-
rb_define_method(cBackend, "search_index_freeze_plan", cb_Backend_search_index_freeze_plan, 5);
|
|
1238
|
+
cBackend, "search_index_upsert", cb_method<cb_Backend_search_index_upsert>::invoke, 5);
|
|
1272
1239
|
rb_define_method(
|
|
1273
|
-
cBackend, "
|
|
1240
|
+
cBackend, "search_index_drop", cb_method<cb_Backend_search_index_drop>::invoke, 5);
|
|
1274
1241
|
rb_define_method(
|
|
1275
|
-
cBackend, "
|
|
1242
|
+
cBackend, "search_index_get_stats", cb_method<cb_Backend_search_index_get_stats>::invoke, 3);
|
|
1243
|
+
rb_define_method(cBackend,
|
|
1244
|
+
"search_index_get_documents_count",
|
|
1245
|
+
cb_method<cb_Backend_search_index_get_documents_count>::invoke,
|
|
1246
|
+
5);
|
|
1247
|
+
rb_define_method(cBackend,
|
|
1248
|
+
"search_index_pause_ingest",
|
|
1249
|
+
cb_method<cb_Backend_search_index_pause_ingest>::invoke,
|
|
1250
|
+
5);
|
|
1251
|
+
rb_define_method(cBackend,
|
|
1252
|
+
"search_index_resume_ingest",
|
|
1253
|
+
cb_method<cb_Backend_search_index_resume_ingest>::invoke,
|
|
1254
|
+
5);
|
|
1255
|
+
rb_define_method(cBackend,
|
|
1256
|
+
"search_index_allow_querying",
|
|
1257
|
+
cb_method<cb_Backend_search_index_allow_querying>::invoke,
|
|
1258
|
+
5);
|
|
1259
|
+
rb_define_method(cBackend,
|
|
1260
|
+
"search_index_disallow_querying",
|
|
1261
|
+
cb_method<cb_Backend_search_index_disallow_querying>::invoke,
|
|
1262
|
+
5);
|
|
1263
|
+
rb_define_method(cBackend,
|
|
1264
|
+
"search_index_freeze_plan",
|
|
1265
|
+
cb_method<cb_Backend_search_index_freeze_plan>::invoke,
|
|
1266
|
+
5);
|
|
1267
|
+
rb_define_method(cBackend,
|
|
1268
|
+
"search_index_unfreeze_plan",
|
|
1269
|
+
cb_method<cb_Backend_search_index_unfreeze_plan>::invoke,
|
|
1270
|
+
5);
|
|
1271
|
+
rb_define_method(cBackend,
|
|
1272
|
+
"search_index_analyze_document",
|
|
1273
|
+
cb_method<cb_Backend_search_index_analyze_document>::invoke,
|
|
1274
|
+
6);
|
|
1276
1275
|
}
|
|
1277
1276
|
} // namespace couchbase::ruby
|