From 2264aab084a22a1e256552afe9d8f23c9b81587f Mon Sep 17 00:00:00 2001 From: yukun Date: Thu, 28 May 2020 10:01:28 +0800 Subject: [PATCH] Add new hybrid search api (#2445) * Add json-string-dsl hybrid search api Signed-off-by: fishpenguin * Add C++ sdk for json-string-dsl hybrid search Signed-off-by: fishpenguin * Add C++ examples for new hybrid search api Signed-off-by: fishpenguin * Add unittest for new hybrid search api Signed-off-by: fishpenguin --- core/src/db/DB.h | 4 +- core/src/db/DBImpl.cpp | 15 +- core/src/db/DBImpl.h | 8 +- core/src/db/engine/ExecutionEngine.h | 5 +- core/src/db/engine/ExecutionEngineImpl.cpp | 27 +- core/src/db/engine/ExecutionEngineImpl.h | 6 +- core/src/grpc/gen-milvus/milvus.grpc.pb.cc | 60 +- core/src/grpc/gen-milvus/milvus.grpc.pb.h | 259 ++- core/src/grpc/gen-milvus/milvus.pb.cc | 1634 +++++++++++++---- core/src/grpc/gen-milvus/milvus.pb.h | 775 +++++++- core/src/grpc/milvus.proto | 27 +- core/src/query/BinaryQuery.cpp | 2 +- core/src/query/GeneralQuery.h | 9 +- core/src/scheduler/job/SearchJob.cpp | 8 +- core/src/scheduler/job/SearchJob.h | 8 +- core/src/scheduler/task/SearchTask.cpp | 8 +- core/src/server/delivery/RequestHandler.cpp | 14 +- core/src/server/delivery/RequestHandler.h | 8 +- .../hybrid_request/HybridSearchRequest.cpp | 26 +- .../hybrid_request/HybridSearchRequest.h | 15 +- .../server/grpc_impl/GrpcRequestHandler.cpp | 469 ++++- .../src/server/grpc_impl/GrpcRequestHandler.h | 16 + .../web_impl/handler/WebRequestHandler.cpp | 17 +- .../web_impl/handler/WebRequestHandler.h | 1 + core/src/utils/Error.h | 1 + core/unittest/db/test_hybrid_db.cpp | 19 +- core/unittest/server/test_rpc.cpp | 43 +- sdk/examples/hybrid/src/ClientTest.cpp | 50 +- sdk/examples/hybrid/src/ClientTest.h | 3 + sdk/examples/utils/Utils.cpp | 134 +- sdk/examples/utils/Utils.h | 15 +- sdk/grpc-gen/gen-milvus/milvus.grpc.pb.cc | 60 +- sdk/grpc-gen/gen-milvus/milvus.grpc.pb.h | 259 ++- sdk/grpc-gen/gen-milvus/milvus.pb.cc | 1634 +++++++++++++---- sdk/grpc-gen/gen-milvus/milvus.pb.h | 775 +++++++- sdk/grpc/ClientProxy.cpp | 38 +- sdk/grpc/ClientProxy.h | 12 +- sdk/grpc/GrpcClient.cpp | 17 + sdk/grpc/GrpcClient.h | 3 + sdk/include/MilvusApi.h | 13 +- sdk/interface/ConnectionImpl.cpp | 17 +- sdk/interface/ConnectionImpl.h | 12 +- 42 files changed, 5336 insertions(+), 1190 deletions(-) diff --git a/core/src/db/DB.h b/core/src/db/DB.h index f7151e93..88aef975 100644 --- a/core/src/db/DB.h +++ b/core/src/db/DB.h @@ -168,8 +168,8 @@ class DB { virtual Status HybridQuery(const std::shared_ptr& context, const std::string& collection_id, - const std::vector& partition_tags, context::HybridSearchContextPtr hybrid_search_context, - query::GeneralQueryPtr general_query, std::vector& field_name, + const std::vector& partition_tags, query::GeneralQueryPtr general_query, + query::QueryPtr query_ptr, std::vector& field_name, std::unordered_map& attr_type, engine::QueryResult& result) = 0; }; // DB diff --git a/core/src/db/DBImpl.cpp b/core/src/db/DBImpl.cpp index bb7a8d56..5be3d8fa 100644 --- a/core/src/db/DBImpl.cpp +++ b/core/src/db/DBImpl.cpp @@ -1783,9 +1783,8 @@ DBImpl::QueryByIDs(const std::shared_ptr& context, const std::s Status DBImpl::HybridQuery(const std::shared_ptr& context, const std::string& collection_id, - const std::vector& partition_tags, - context::HybridSearchContextPtr hybrid_search_context, query::GeneralQueryPtr general_query, - std::vector& field_names, + const std::vector& partition_tags, query::GeneralQueryPtr general_query, + query::QueryPtr query_ptr, std::vector& field_names, std::unordered_map& attr_type, engine::QueryResult& result) { auto query_ctx = context->Child("Query"); @@ -1837,8 +1836,8 @@ DBImpl::HybridQuery(const std::shared_ptr& context, const std:: } cache::CpuCacheMgr::GetInstance()->PrintInfo(); // print cache info before query - status = HybridQueryAsync(query_ctx, collection_id, files_holder, hybrid_search_context, general_query, field_names, - attr_type, result); + status = HybridQueryAsync(query_ctx, collection_id, files_holder, general_query, query_ptr, field_names, attr_type, + result); if (!status.ok()) { return status; } @@ -1999,8 +1998,8 @@ DBImpl::QueryAsync(const std::shared_ptr& context, meta::FilesH Status DBImpl::HybridQueryAsync(const std::shared_ptr& context, const std::string& collection_id, - meta::FilesHolder& files_holder, context::HybridSearchContextPtr hybrid_search_context, - query::GeneralQueryPtr general_query, std::vector& field_names, + meta::FilesHolder& files_holder, query::GeneralQueryPtr general_query, + query::QueryPtr query_ptr, std::vector& field_names, std::unordered_map& attr_type, engine::QueryResult& result) { auto query_async_ctx = context->Child("Query Async"); @@ -2030,7 +2029,7 @@ DBImpl::HybridQueryAsync(const std::shared_ptr& context, const milvus::engine::meta::SegmentsSchema& files = files_holder.HoldFiles(); LOG_ENGINE_DEBUG_ << LogOut("Engine query begin, index file count: %ld", files_holder.HoldFiles().size()); scheduler::SearchJobPtr job = - std::make_shared(query_async_ctx, general_query, attr_type, vectors); + std::make_shared(query_async_ctx, general_query, query_ptr, attr_type, vectors); for (auto& file : files) { scheduler::SegmentSchemaPtr file_ptr = std::make_shared(file); job->AddIndexFile(file_ptr); diff --git a/core/src/db/DBImpl.h b/core/src/db/DBImpl.h index fda11aed..00ce4872 100644 --- a/core/src/db/DBImpl.h +++ b/core/src/db/DBImpl.h @@ -160,8 +160,8 @@ class DBImpl : public DB, public server::CacheConfigHandler, public server::Engi Status HybridQuery(const std::shared_ptr& context, const std::string& collection_id, - const std::vector& partition_tags, context::HybridSearchContextPtr hybrid_search_context, - query::GeneralQueryPtr general_query, std::vector& field_names, + const std::vector& partition_tags, query::GeneralQueryPtr general_query, + query::QueryPtr query_ptr, std::vector& field_names, std::unordered_map& attr_type, engine::QueryResult& result) override; @@ -198,8 +198,8 @@ class DBImpl : public DB, public server::CacheConfigHandler, public server::Engi Status HybridQueryAsync(const std::shared_ptr& context, const std::string& collection_id, - meta::FilesHolder& files_holder, context::HybridSearchContextPtr hybrid_search_context, - query::GeneralQueryPtr general_query, std::vector& field_names, + meta::FilesHolder& files_holder, query::GeneralQueryPtr general_query, query::QueryPtr query_ptr, + std::vector& field_names, std::unordered_map& attr_type, engine::QueryResult& result); diff --git a/core/src/db/engine/ExecutionEngine.h b/core/src/db/engine/ExecutionEngine.h index 219e6f2b..16f45b8a 100644 --- a/core/src/db/engine/ExecutionEngine.h +++ b/core/src/db/engine/ExecutionEngine.h @@ -117,12 +117,11 @@ class ExecutionEngine { virtual Status ExecBinaryQuery(query::GeneralQueryPtr general_query, faiss::ConcurrentBitsetPtr& bitset, - std::unordered_map& attr_type, - milvus::query::VectorQueryPtr& vector_query) = 0; + std::unordered_map& attr_type, std::string& vector_placeholder) = 0; virtual Status HybridSearch(query::GeneralQueryPtr general_query, std::unordered_map& attr_type, - uint64_t& nq, uint64_t& topk, std::vector& distances, std::vector& search_ids) = 0; + query::QueryPtr query_ptr, std::vector& distances, std::vector& search_ids) = 0; virtual Status Search(int64_t n, const float* data, int64_t k, const milvus::json& extra_params, float* distances, int64_t* labels, diff --git a/core/src/db/engine/ExecutionEngineImpl.cpp b/core/src/db/engine/ExecutionEngineImpl.cpp index ca4e1754..b47559f7 100644 --- a/core/src/db/engine/ExecutionEngineImpl.cpp +++ b/core/src/db/engine/ExecutionEngineImpl.cpp @@ -787,12 +787,15 @@ ExecutionEngineImpl::ProcessRangeQuery(std::vector data, T value, query::Comp } Status -ExecutionEngineImpl::HybridSearch(milvus::query::GeneralQueryPtr general_query, - std::unordered_map& attr_type, uint64_t& nq, uint64_t& topk, +ExecutionEngineImpl::HybridSearch(query::GeneralQueryPtr general_query, + std::unordered_map& attr_type, query::QueryPtr query_ptr, std::vector& distances, std::vector& search_ids) { faiss::ConcurrentBitsetPtr bitset; - milvus::query::VectorQueryPtr vector_query; - auto status = ExecBinaryQuery(general_query, bitset, attr_type, vector_query); + std::string vector_placeholder; + auto status = ExecBinaryQuery(general_query, bitset, attr_type, vector_placeholder); + if (!status.ok()) { + return status; + } // Do search faiss::ConcurrentBitsetPtr list; @@ -804,8 +807,10 @@ ExecutionEngineImpl::HybridSearch(milvus::query::GeneralQueryPtr general_query, } } index_->SetBlacklist(list); - topk = vector_query->topk; - nq = vector_query->query_vector.float_data.size() / dim_; + + auto vector_query = query_ptr->vectors.at(vector_placeholder); + int64_t topk = vector_query->topk; + int64_t nq = vector_query->query_vector.float_data.size() / dim_; distances.resize(nq * topk); search_ids.resize(nq * topk); @@ -822,18 +827,18 @@ ExecutionEngineImpl::HybridSearch(milvus::query::GeneralQueryPtr general_query, Status ExecutionEngineImpl::ExecBinaryQuery(milvus::query::GeneralQueryPtr general_query, faiss::ConcurrentBitsetPtr& bitset, std::unordered_map& attr_type, - milvus::query::VectorQueryPtr& vector_query) { + std::string& vector_placeholder) { if (general_query->leaf == nullptr) { Status status; faiss::ConcurrentBitsetPtr left_bitset, right_bitset; if (general_query->bin->left_query != nullptr) { - status = ExecBinaryQuery(general_query->bin->left_query, left_bitset, attr_type, vector_query); + status = ExecBinaryQuery(general_query->bin->left_query, left_bitset, attr_type, vector_placeholder); if (!status.ok()) { return status; } } if (general_query->bin->right_query != nullptr) { - status = ExecBinaryQuery(general_query->bin->right_query, right_bitset, attr_type, vector_query); + status = ExecBinaryQuery(general_query->bin->right_query, right_bitset, attr_type, vector_placeholder); if (!status.ok()) { return status; } @@ -1099,9 +1104,9 @@ ExecutionEngineImpl::ExecBinaryQuery(milvus::query::GeneralQueryPtr general_quer } return Status::OK(); } - if (general_query->leaf->vector_query != nullptr) { + if (general_query->leaf->vector_placeholder.size() > 0) { // skip vector query - vector_query = general_query->leaf->vector_query; + vector_placeholder = general_query->leaf->vector_placeholder; bitset = nullptr; return Status::OK(); } diff --git a/core/src/db/engine/ExecutionEngineImpl.h b/core/src/db/engine/ExecutionEngineImpl.h index a1f31607..9975dac9 100644 --- a/core/src/db/engine/ExecutionEngineImpl.h +++ b/core/src/db/engine/ExecutionEngineImpl.h @@ -71,13 +71,11 @@ class ExecutionEngineImpl : public ExecutionEngine { Status ExecBinaryQuery(query::GeneralQueryPtr general_query, faiss::ConcurrentBitsetPtr& bitset, - std::unordered_map& attr_type, - milvus::query::VectorQueryPtr& vector_query) override; + std::unordered_map& attr_type, std::string& vector_placeholder) override; Status HybridSearch(query::GeneralQueryPtr general_query, std::unordered_map& attr_type, - uint64_t& nq, uint64_t& topk, std::vector& distances, - std::vector& search_ids) override; + query::QueryPtr query_ptr, std::vector& distances, std::vector& search_ids) override; Status Search(int64_t n, const float* data, int64_t k, const milvus::json& extra_params, float* distances, int64_t* labels, diff --git a/core/src/grpc/gen-milvus/milvus.grpc.pb.cc b/core/src/grpc/gen-milvus/milvus.grpc.pb.cc index 9dde7b29..52f2e8a5 100644 --- a/core/src/grpc/gen-milvus/milvus.grpc.pb.cc +++ b/core/src/grpc/gen-milvus/milvus.grpc.pb.cc @@ -54,6 +54,7 @@ static const char* MilvusService_method_names[] = { "/milvus.grpc.MilvusService/ShowHybridCollectionInfo", "/milvus.grpc.MilvusService/PreloadHybridCollection", "/milvus.grpc.MilvusService/InsertEntity", + "/milvus.grpc.MilvusService/HybridSearchPB", "/milvus.grpc.MilvusService/HybridSearch", "/milvus.grpc.MilvusService/HybridSearchInSegments", "/milvus.grpc.MilvusService/GetEntityByID", @@ -102,11 +103,12 @@ MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& chan , rpcmethod_ShowHybridCollectionInfo_(MilvusService_method_names[31], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_PreloadHybridCollection_(MilvusService_method_names[32], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_InsertEntity_(MilvusService_method_names[33], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HybridSearch_(MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HybridSearchInSegments_(MilvusService_method_names[35], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_GetEntityByID_(MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_GetEntityIDs_(MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_DeleteEntitiesByID_(MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearchPB_(MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearch_(MilvusService_method_names[35], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearchInSegments_(MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetEntityByID_(MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetEntityIDs_(MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_DeleteEntitiesByID_(MilvusService_method_names[39], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status MilvusService::Stub::CreateCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionSchema& request, ::milvus::grpc::Status* response) { @@ -1061,6 +1063,34 @@ void MilvusService::Stub::experimental_async::InsertEntity(::grpc::ClientContext return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HEntityIDs>::Create(channel_.get(), cq, rpcmethod_InsertEntity_, context, request, false); } +::grpc::Status MilvusService::Stub::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HybridSearchPB_, context, request, response); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* MilvusService::Stub::AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HQueryResult>::Create(channel_.get(), cq, rpcmethod_HybridSearchPB_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* MilvusService::Stub::PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HQueryResult>::Create(channel_.get(), cq, rpcmethod_HybridSearchPB_, context, request, false); +} + ::grpc::Status MilvusService::Stub::HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HybridSearch_, context, request, response); } @@ -1375,25 +1405,30 @@ MilvusService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>( + std::mem_fn(&MilvusService::Service::HybridSearchPB), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[35], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>( std::mem_fn(&MilvusService::Service::HybridSearch), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[35], + MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>( std::mem_fn(&MilvusService::Service::HybridSearchInSegments), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[36], + MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>( std::mem_fn(&MilvusService::Service::GetEntityByID), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[37], + MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>( std::mem_fn(&MilvusService::Service::GetEntityIDs), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[38], + MilvusService_method_names[39], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>( std::mem_fn(&MilvusService::Service::DeleteEntitiesByID), this))); @@ -1640,6 +1675,13 @@ MilvusService::Service::~Service() { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status MilvusService::Service::HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + ::grpc::Status MilvusService::Service::HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response) { (void) context; (void) request; diff --git a/core/src/grpc/gen-milvus/milvus.grpc.pb.h b/core/src/grpc/gen-milvus/milvus.grpc.pb.h index c90fa1ba..0cb5cf4a 100644 --- a/core/src/grpc/gen-milvus/milvus.grpc.pb.h +++ b/core/src/grpc/gen-milvus/milvus.grpc.pb.h @@ -447,6 +447,13 @@ class MilvusService final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>> PrepareAsyncInsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>>(PrepareAsyncInsertEntityRaw(context, request, cq)); } + virtual ::grpc::Status HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> AsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchPBRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> PrepareAsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(PrepareAsyncHybridSearchPBRaw(context, request, cq)); + } virtual ::grpc::Status HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> AsyncHybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchRaw(context, request, cq)); @@ -783,6 +790,10 @@ class MilvusService final { virtual void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, std::function) = 0; virtual void InsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; virtual void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; @@ -874,6 +885,8 @@ class MilvusService final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncPreloadHybridCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>* AsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>* PrepareAsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* AsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncHybridSearchInSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchInSegmentsParam& request, ::grpc::CompletionQueue* cq) = 0; @@ -1126,6 +1139,13 @@ class MilvusService final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>> PrepareAsyncInsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>>(PrepareAsyncInsertEntityRaw(context, request, cq)); } + ::grpc::Status HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> AsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchPBRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> PrepareAsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(PrepareAsyncHybridSearchPBRaw(context, request, cq)); + } ::grpc::Status HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> AsyncHybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchRaw(context, request, cq)); @@ -1300,6 +1320,10 @@ class MilvusService final { void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, std::function) override; void InsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, std::function) override; void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) override; void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; @@ -1399,6 +1423,8 @@ class MilvusService final { ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncPreloadHybridCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>* AsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>* PrepareAsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* AsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* AsyncHybridSearchInSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchInSegmentsParam& request, ::grpc::CompletionQueue* cq) override; @@ -1443,6 +1469,7 @@ class MilvusService final { const ::grpc::internal::RpcMethod rpcmethod_ShowHybridCollectionInfo_; const ::grpc::internal::RpcMethod rpcmethod_PreloadHybridCollection_; const ::grpc::internal::RpcMethod rpcmethod_InsertEntity_; + const ::grpc::internal::RpcMethod rpcmethod_HybridSearchPB_; const ::grpc::internal::RpcMethod rpcmethod_HybridSearch_; const ::grpc::internal::RpcMethod rpcmethod_HybridSearchInSegments_; const ::grpc::internal::RpcMethod rpcmethod_GetEntityByID_; @@ -1651,6 +1678,7 @@ class MilvusService final { // ///////////////////////////////////////////////////////////////// // virtual ::grpc::Status InsertEntity(::grpc::ServerContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response); + virtual ::grpc::Status HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response); virtual ::grpc::Status HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response); virtual ::grpc::Status HybridSearchInSegments(::grpc::ServerContext* context, const ::milvus::grpc::HSearchInSegmentsParam* request, ::milvus::grpc::TopKQueryResult* response); virtual ::grpc::Status GetEntityByID(::grpc::ServerContext* context, const ::milvus::grpc::VectorsIdentity* request, ::milvus::grpc::HEntity* response); @@ -2338,12 +2366,32 @@ class MilvusService final { } }; template + class WithAsyncMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodAsync(34); + } + ~WithAsyncMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHybridSearchPB(::grpc::ServerContext* context, ::milvus::grpc::HSearchParamPB* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_HybridSearch() { - ::grpc::Service::MarkMethodAsync(34); + ::grpc::Service::MarkMethodAsync(35); } ~WithAsyncMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -2354,7 +2402,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearch(::grpc::ServerContext* context, ::milvus::grpc::HSearchParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2363,7 +2411,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodAsync(35); + ::grpc::Service::MarkMethodAsync(36); } ~WithAsyncMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -2374,7 +2422,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearchInSegments(::grpc::ServerContext* context, ::milvus::grpc::HSearchInSegmentsParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2383,7 +2431,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_GetEntityByID() { - ::grpc::Service::MarkMethodAsync(36); + ::grpc::Service::MarkMethodAsync(37); } ~WithAsyncMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -2394,7 +2442,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityByID(::grpc::ServerContext* context, ::milvus::grpc::VectorsIdentity* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HEntity>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2403,7 +2451,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodAsync(37); + ::grpc::Service::MarkMethodAsync(38); } ~WithAsyncMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -2414,7 +2462,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityIDs(::grpc::ServerContext* context, ::milvus::grpc::HGetEntityIDsParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HEntityIDs>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2423,7 +2471,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodAsync(38); + ::grpc::Service::MarkMethodAsync(39); } ~WithAsyncMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -2434,10 +2482,10 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestDeleteEntitiesByID(::grpc::ServerContext* context, ::milvus::grpc::HDeleteByIDParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(39, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; + typedef WithAsyncMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; template class ExperimentalWithCallbackMethod_CreateCollection : public BaseClass { private: @@ -3493,12 +3541,43 @@ class MilvusService final { virtual void InsertEntity(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HInsertParam* /*request*/, ::milvus::grpc::HEntityIDs* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template + class ExperimentalWithCallbackMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HybridSearchPB() { + ::grpc::Service::experimental().MarkMethodCallback(34, + new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::HSearchParamPB* request, + ::milvus::grpc::HQueryResult* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->HybridSearchPB(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_HybridSearchPB( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>*>( + ::grpc::Service::experimental().GetHandler(34)) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template class ExperimentalWithCallbackMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_HybridSearch() { - ::grpc::Service::experimental().MarkMethodCallback(34, + ::grpc::Service::experimental().MarkMethodCallback(35, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, @@ -3510,7 +3589,7 @@ class MilvusService final { void SetMessageAllocatorFor_HybridSearch( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>*>( - ::grpc::Service::experimental().GetHandler(34)) + ::grpc::Service::experimental().GetHandler(35)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_HybridSearch() override { @@ -3529,7 +3608,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_HybridSearchInSegments() { - ::grpc::Service::experimental().MarkMethodCallback(35, + ::grpc::Service::experimental().MarkMethodCallback(36, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HSearchInSegmentsParam* request, @@ -3541,7 +3620,7 @@ class MilvusService final { void SetMessageAllocatorFor_HybridSearchInSegments( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>*>( - ::grpc::Service::experimental().GetHandler(35)) + ::grpc::Service::experimental().GetHandler(36)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_HybridSearchInSegments() override { @@ -3560,7 +3639,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_GetEntityByID() { - ::grpc::Service::experimental().MarkMethodCallback(36, + ::grpc::Service::experimental().MarkMethodCallback(37, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>( [this](::grpc::ServerContext* context, const ::milvus::grpc::VectorsIdentity* request, @@ -3572,7 +3651,7 @@ class MilvusService final { void SetMessageAllocatorFor_GetEntityByID( ::grpc::experimental::MessageAllocator< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>*>( - ::grpc::Service::experimental().GetHandler(36)) + ::grpc::Service::experimental().GetHandler(37)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_GetEntityByID() override { @@ -3591,7 +3670,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_GetEntityIDs() { - ::grpc::Service::experimental().MarkMethodCallback(37, + ::grpc::Service::experimental().MarkMethodCallback(38, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HGetEntityIDsParam* request, @@ -3603,7 +3682,7 @@ class MilvusService final { void SetMessageAllocatorFor_GetEntityIDs( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>*>( - ::grpc::Service::experimental().GetHandler(37)) + ::grpc::Service::experimental().GetHandler(38)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_GetEntityIDs() override { @@ -3622,7 +3701,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_DeleteEntitiesByID() { - ::grpc::Service::experimental().MarkMethodCallback(38, + ::grpc::Service::experimental().MarkMethodCallback(39, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HDeleteByIDParam* request, @@ -3634,7 +3713,7 @@ class MilvusService final { void SetMessageAllocatorFor_DeleteEntitiesByID( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>*>( - ::grpc::Service::experimental().GetHandler(38)) + ::grpc::Service::experimental().GetHandler(39)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_DeleteEntitiesByID() override { @@ -3647,7 +3726,7 @@ class MilvusService final { } virtual void DeleteEntitiesByID(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HDeleteByIDParam* /*request*/, ::milvus::grpc::Status* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; - typedef ExperimentalWithCallbackMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService; + typedef ExperimentalWithCallbackMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService; template class WithGenericMethod_CreateCollection : public BaseClass { private: @@ -4227,12 +4306,29 @@ class MilvusService final { } }; template + class WithGenericMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodGeneric(34); + } + ~WithGenericMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithGenericMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_HybridSearch() { - ::grpc::Service::MarkMethodGeneric(34); + ::grpc::Service::MarkMethodGeneric(35); } ~WithGenericMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -4249,7 +4345,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodGeneric(35); + ::grpc::Service::MarkMethodGeneric(36); } ~WithGenericMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -4266,7 +4362,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_GetEntityByID() { - ::grpc::Service::MarkMethodGeneric(36); + ::grpc::Service::MarkMethodGeneric(37); } ~WithGenericMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -4283,7 +4379,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodGeneric(37); + ::grpc::Service::MarkMethodGeneric(38); } ~WithGenericMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -4300,7 +4396,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodGeneric(38); + ::grpc::Service::MarkMethodGeneric(39); } ~WithGenericMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -4992,12 +5088,32 @@ class MilvusService final { } }; template + class WithRawMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodRaw(34); + } + ~WithRawMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHybridSearchPB(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_HybridSearch() { - ::grpc::Service::MarkMethodRaw(34); + ::grpc::Service::MarkMethodRaw(35); } ~WithRawMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -5008,7 +5124,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearch(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5017,7 +5133,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodRaw(35); + ::grpc::Service::MarkMethodRaw(36); } ~WithRawMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -5028,7 +5144,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearchInSegments(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5037,7 +5153,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_GetEntityByID() { - ::grpc::Service::MarkMethodRaw(36); + ::grpc::Service::MarkMethodRaw(37); } ~WithRawMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -5048,7 +5164,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityByID(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5057,7 +5173,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodRaw(37); + ::grpc::Service::MarkMethodRaw(38); } ~WithRawMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -5068,7 +5184,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityIDs(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5077,7 +5193,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodRaw(38); + ::grpc::Service::MarkMethodRaw(39); } ~WithRawMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -5088,7 +5204,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestDeleteEntitiesByID(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(39, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5942,12 +6058,37 @@ class MilvusService final { virtual void InsertEntity(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template + class ExperimentalWithRawCallbackMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HybridSearchPB() { + ::grpc::Service::experimental().MarkMethodRawCallback(34, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->HybridSearchPB(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HybridSearchPB(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template class ExperimentalWithRawCallbackMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_HybridSearch() { - ::grpc::Service::experimental().MarkMethodRawCallback(34, + ::grpc::Service::experimental().MarkMethodRawCallback(35, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -5972,7 +6113,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_HybridSearchInSegments() { - ::grpc::Service::experimental().MarkMethodRawCallback(35, + ::grpc::Service::experimental().MarkMethodRawCallback(36, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -5997,7 +6138,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_GetEntityByID() { - ::grpc::Service::experimental().MarkMethodRawCallback(36, + ::grpc::Service::experimental().MarkMethodRawCallback(37, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6022,7 +6163,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_GetEntityIDs() { - ::grpc::Service::experimental().MarkMethodRawCallback(37, + ::grpc::Service::experimental().MarkMethodRawCallback(38, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6047,7 +6188,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_DeleteEntitiesByID() { - ::grpc::Service::experimental().MarkMethodRawCallback(38, + ::grpc::Service::experimental().MarkMethodRawCallback(39, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6747,12 +6888,32 @@ class MilvusService final { virtual ::grpc::Status StreamedInsertEntity(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HInsertParam,::milvus::grpc::HEntityIDs>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodStreamed(34, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearchPB::StreamedHybridSearchPB, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHybridSearchPB(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HSearchParamPB,::milvus::grpc::HQueryResult>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_HybridSearch() { - ::grpc::Service::MarkMethodStreamed(34, + ::grpc::Service::MarkMethodStreamed(35, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearch::StreamedHybridSearch, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_HybridSearch() override { @@ -6772,7 +6933,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodStreamed(35, + ::grpc::Service::MarkMethodStreamed(36, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearchInSegments::StreamedHybridSearchInSegments, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_HybridSearchInSegments() override { @@ -6792,7 +6953,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_GetEntityByID() { - ::grpc::Service::MarkMethodStreamed(36, + ::grpc::Service::MarkMethodStreamed(37, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>(std::bind(&WithStreamedUnaryMethod_GetEntityByID::StreamedGetEntityByID, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_GetEntityByID() override { @@ -6812,7 +6973,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodStreamed(37, + ::grpc::Service::MarkMethodStreamed(38, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>(std::bind(&WithStreamedUnaryMethod_GetEntityIDs::StreamedGetEntityIDs, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_GetEntityIDs() override { @@ -6832,7 +6993,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodStreamed(38, + ::grpc::Service::MarkMethodStreamed(39, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_DeleteEntitiesByID::StreamedDeleteEntitiesByID, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_DeleteEntitiesByID() override { @@ -6846,9 +7007,9 @@ class MilvusService final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedDeleteEntitiesByID(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HDeleteByIDParam,::milvus::grpc::Status>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; + typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; + typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; }; } // namespace grpc diff --git a/core/src/grpc/gen-milvus/milvus.pb.cc b/core/src/grpc/gen-milvus/milvus.pb.cc index b5e05c1a..0c0d76fd 100644 --- a/core/src/grpc/gen-milvus/milvus.pb.cc +++ b/core/src/grpc/gen-milvus/milvus.pb.cc @@ -21,7 +21,7 @@ extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_FieldParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldType_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_HEntity_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParam_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParamPB_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValuePair_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Mapping_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RangeQuery_milvus_2eproto; @@ -31,6 +31,7 @@ extern PROTOBUF_INTERNAL_EXPORT_status_2eproto ::PROTOBUF_NAMESPACE_ID::internal extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TermQuery_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VectorFieldParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorFieldRecord_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_VectorQuery_milvus_2eproto; namespace milvus { namespace grpc { @@ -193,10 +194,18 @@ class GeneralQueryDefaultTypeInternal { const ::milvus::grpc::RangeQuery* range_query_; const ::milvus::grpc::VectorQuery* vector_query_; } _GeneralQuery_default_instance_; +class VectorParamDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _VectorParam_default_instance_; class HSearchParamDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _HSearchParam_default_instance_; +class HSearchParamPBDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _HSearchParamPB_default_instance_; class HSearchInSegmentsParamDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -618,7 +627,7 @@ static void InitDefaultsscc_info_HSearchInSegmentsParam_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_HSearchInSegmentsParam_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_HSearchInSegmentsParam_milvus_2eproto}, { - &scc_info_HSearchParam_milvus_2eproto.base,}}; + &scc_info_HSearchParamPB_milvus_2eproto.base,}}; static void InitDefaultsscc_info_HSearchParam_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -633,6 +642,22 @@ static void InitDefaultsscc_info_HSearchParam_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParam_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_HSearchParam_milvus_2eproto}, { + &scc_info_VectorParam_milvus_2eproto.base, + &scc_info_KeyValuePair_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_HSearchParamPB_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_HSearchParamPB_default_instance_; + new (ptr) ::milvus::grpc::HSearchParamPB(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::HSearchParamPB::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParamPB_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_HSearchParamPB_milvus_2eproto}, { &scc_info_BooleanQuery_milvus_2eproto.base, &scc_info_KeyValuePair_milvus_2eproto.base,}}; @@ -908,6 +933,21 @@ static void InitDefaultsscc_info_VectorIds_milvus_2eproto() { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorIds_milvus_2eproto}, { &scc_info_Status_status_2eproto.base,}}; +static void InitDefaultsscc_info_VectorParam_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_VectorParam_default_instance_; + new (ptr) ::milvus::grpc::VectorParam(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::VectorParam::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorParam_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorParam_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base,}}; + static void InitDefaultsscc_info_VectorQuery_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -954,7 +994,7 @@ static void InitDefaultsscc_info_VectorsIdentity_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VectorsIdentity_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_VectorsIdentity_milvus_2eproto}, {}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[48]; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[50]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_milvus_2eproto[3]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr; @@ -1252,15 +1292,32 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROT offsetof(::milvus::grpc::GeneralQueryDefaultTypeInternal, vector_query_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::GeneralQuery, query_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, json_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, row_record_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, collection_name_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, partition_tag_array_), - PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, general_query_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, vector_param_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, dsl_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, extra_params_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, collection_name_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, partition_tag_array_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, general_query_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, extra_params_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchInSegmentsParam, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -1383,17 +1440,19 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 265, -1, sizeof(::milvus::grpc::VectorQuery)}, { 275, -1, sizeof(::milvus::grpc::BooleanQuery)}, { 282, -1, sizeof(::milvus::grpc::GeneralQuery)}, - { 292, -1, sizeof(::milvus::grpc::HSearchParam)}, - { 301, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)}, - { 308, -1, sizeof(::milvus::grpc::AttrRecord)}, - { 315, -1, sizeof(::milvus::grpc::HEntity)}, - { 327, -1, sizeof(::milvus::grpc::HQueryResult)}, - { 338, -1, sizeof(::milvus::grpc::HInsertParam)}, - { 348, -1, sizeof(::milvus::grpc::HEntityIdentity)}, - { 355, -1, sizeof(::milvus::grpc::HEntityIDs)}, - { 362, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)}, - { 369, -1, sizeof(::milvus::grpc::HDeleteByIDParam)}, - { 376, -1, sizeof(::milvus::grpc::HIndexParam)}, + { 292, -1, sizeof(::milvus::grpc::VectorParam)}, + { 299, -1, sizeof(::milvus::grpc::HSearchParam)}, + { 309, -1, sizeof(::milvus::grpc::HSearchParamPB)}, + { 318, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)}, + { 325, -1, sizeof(::milvus::grpc::AttrRecord)}, + { 332, -1, sizeof(::milvus::grpc::HEntity)}, + { 344, -1, sizeof(::milvus::grpc::HQueryResult)}, + { 355, -1, sizeof(::milvus::grpc::HInsertParam)}, + { 365, -1, sizeof(::milvus::grpc::HEntityIdentity)}, + { 372, -1, sizeof(::milvus::grpc::HEntityIDs)}, + { 379, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)}, + { 386, -1, sizeof(::milvus::grpc::HDeleteByIDParam)}, + { 393, -1, sizeof(::milvus::grpc::HIndexParam)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -1434,7 +1493,9 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&::milvus::grpc::_VectorQuery_default_instance_), reinterpret_cast(&::milvus::grpc::_BooleanQuery_default_instance_), reinterpret_cast(&::milvus::grpc::_GeneralQuery_default_instance_), + reinterpret_cast(&::milvus::grpc::_VectorParam_default_instance_), reinterpret_cast(&::milvus::grpc::_HSearchParam_default_instance_), + reinterpret_cast(&::milvus::grpc::_HSearchParamPB_default_instance_), reinterpret_cast(&::milvus::grpc::_HSearchInSegmentsParam_default_instance_), reinterpret_cast(&::milvus::grpc::_AttrRecord_default_instance_), reinterpret_cast(&::milvus::grpc::_HEntity_default_instance_), @@ -1543,125 +1604,134 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE( "\n\nterm_query\030\002 \001(\0132\026.milvus.grpc.TermQue" "ryH\000\022.\n\013range_query\030\003 \001(\0132\027.milvus.grpc." "RangeQueryH\000\0220\n\014vector_query\030\004 \001(\0132\030.mil" - "vus.grpc.VectorQueryH\000B\007\n\005query\"\247\001\n\014HSea" - "rchParam\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023par" - "tition_tag_array\030\002 \003(\t\0220\n\rgeneral_query\030" - "\003 \001(\0132\031.milvus.grpc.GeneralQuery\022/\n\014extr" - "a_params\030\004 \003(\0132\031.milvus.grpc.KeyValuePai" - "r\"c\n\026HSearchInSegmentsParam\022\030\n\020segment_i" - "d_array\030\001 \003(\t\022/\n\014search_param\030\002 \001(\0132\031.mi" - "lvus.grpc.HSearchParam\"5\n\nAttrRecord\022\021\n\t" - "int_value\030\001 \003(\003\022\024\n\014double_value\030\002 \003(\001\"\363\001" - "\n\007HEntity\022#\n\006status\030\001 \001(\0132\023.milvus.grpc." - "Status\022\021\n\tentity_id\030\002 \003(\003\022\023\n\013field_names" - "\030\003 \003(\t\022)\n\ndata_types\030\004 \003(\0162\025.milvus.grpc" - ".DataType\022\017\n\007row_num\030\005 \001(\003\022*\n\tattr_data\030" - "\006 \003(\0132\027.milvus.grpc.AttrRecord\0223\n\013vector" - "_data\030\007 \003(\0132\036.milvus.grpc.VectorFieldRec" - "ord\"\274\001\n\014HQueryResult\022#\n\006status\030\001 \001(\0132\023.m" - "ilvus.grpc.Status\022$\n\006entity\030\002 \001(\0132\024.milv" - "us.grpc.HEntity\022\017\n\007row_num\030\003 \001(\003\022\r\n\005scor" - "e\030\004 \003(\002\022\020\n\010distance\030\005 \003(\002\022/\n\014extra_param" - "s\030\006 \003(\0132\031.milvus.grpc.KeyValuePair\"\256\001\n\014H" - "InsertParam\022\027\n\017collection_name\030\001 \001(\t\022\025\n\r" - "partition_tag\030\002 \001(\t\022$\n\006entity\030\003 \001(\0132\024.mi" - "lvus.grpc.HEntity\022\027\n\017entity_id_array\030\004 \003" - "(\003\022/\n\014extra_params\030\005 \003(\0132\031.milvus.grpc.K" - "eyValuePair\"6\n\017HEntityIdentity\022\027\n\017collec" - "tion_name\030\001 \001(\t\022\n\n\002id\030\002 \003(\003\"J\n\nHEntityID" - "s\022#\n\006status\030\001 \001(\0132\023.milvus.grpc.Status\022\027" - "\n\017entity_id_array\030\002 \003(\003\"C\n\022HGetEntityIDs" - "Param\022\027\n\017collection_name\030\001 \001(\t\022\024\n\014segmen" - "t_name\030\002 \001(\t\"=\n\020HDeleteByIDParam\022\027\n\017coll" - "ection_name\030\001 \001(\t\022\020\n\010id_array\030\002 \003(\003\"\220\001\n\013" - "HIndexParam\022#\n\006status\030\001 \001(\0132\023.milvus.grp" - "c.Status\022\027\n\017collection_name\030\002 \001(\t\022\022\n\nind" - "ex_type\030\003 \001(\005\022/\n\014extra_params\030\004 \003(\0132\031.mi" - "lvus.grpc.KeyValuePair*\206\001\n\010DataType\022\010\n\004N" - "ULL\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n" - "\005INT64\020\004\022\n\n\006STRING\020\024\022\010\n\004BOOL\020\036\022\t\n\005FLOAT\020" - "(\022\n\n\006DOUBLE\020)\022\n\n\006VECTOR\020d\022\014\n\007UNKNOWN\020\217N*" - "C\n\017CompareOperator\022\006\n\002LT\020\000\022\007\n\003LTE\020\001\022\006\n\002E" - "Q\020\002\022\006\n\002GT\020\003\022\007\n\003GTE\020\004\022\006\n\002NE\020\005*8\n\005Occur\022\013\n" - "\007INVALID\020\000\022\010\n\004MUST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST" - "_NOT\020\0032\321\026\n\rMilvusService\022H\n\020CreateCollec" - "tion\022\035.milvus.grpc.CollectionSchema\032\023.mi" - "lvus.grpc.Status\"\000\022F\n\rHasCollection\022\033.mi" - "lvus.grpc.CollectionName\032\026.milvus.grpc.B" - "oolReply\"\000\022R\n\022DescribeCollection\022\033.milvu" - "s.grpc.CollectionName\032\035.milvus.grpc.Coll" - "ectionSchema\"\000\022Q\n\017CountCollection\022\033.milv" - "us.grpc.CollectionName\032\037.milvus.grpc.Col" - "lectionRowCount\"\000\022J\n\017ShowCollections\022\024.m" - "ilvus.grpc.Command\032\037.milvus.grpc.Collect" - "ionNameList\"\000\022P\n\022ShowCollectionInfo\022\033.mi" - "lvus.grpc.CollectionName\032\033.milvus.grpc.C" - "ollectionInfo\"\000\022D\n\016DropCollection\022\033.milv" - "us.grpc.CollectionName\032\023.milvus.grpc.Sta" - "tus\"\000\022=\n\013CreateIndex\022\027.milvus.grpc.Index" - "Param\032\023.milvus.grpc.Status\"\000\022G\n\rDescribe" - "Index\022\033.milvus.grpc.CollectionName\032\027.mil" - "vus.grpc.IndexParam\"\000\022\?\n\tDropIndex\022\033.mil" - "vus.grpc.CollectionName\032\023.milvus.grpc.St" - "atus\"\000\022E\n\017CreatePartition\022\033.milvus.grpc." - "PartitionParam\032\023.milvus.grpc.Status\"\000\022E\n" - "\014HasPartition\022\033.milvus.grpc.PartitionPar" - "am\032\026.milvus.grpc.BoolReply\"\000\022K\n\016ShowPart" - "itions\022\033.milvus.grpc.CollectionName\032\032.mi" - "lvus.grpc.PartitionList\"\000\022C\n\rDropPartiti" - "on\022\033.milvus.grpc.PartitionParam\032\023.milvus" - ".grpc.Status\"\000\022<\n\006Insert\022\030.milvus.grpc.I" - "nsertParam\032\026.milvus.grpc.VectorIds\"\000\022J\n\016" - "GetVectorsByID\022\034.milvus.grpc.VectorsIden" - "tity\032\030.milvus.grpc.VectorsData\"\000\022H\n\014GetV" - "ectorIDs\022\036.milvus.grpc.GetVectorIDsParam" - "\032\026.milvus.grpc.VectorIds\"\000\022B\n\006Search\022\030.m" - "ilvus.grpc.SearchParam\032\034.milvus.grpc.Top" - "KQueryResult\"\000\022J\n\nSearchByID\022\034.milvus.gr" - "pc.SearchByIDParam\032\034.milvus.grpc.TopKQue" - "ryResult\"\000\022P\n\rSearchInFiles\022\037.milvus.grp" - "c.SearchInFilesParam\032\034.milvus.grpc.TopKQ" - "ueryResult\"\000\0227\n\003Cmd\022\024.milvus.grpc.Comman" - "d\032\030.milvus.grpc.StringReply\"\000\022A\n\nDeleteB" - "yID\022\034.milvus.grpc.DeleteByIDParam\032\023.milv" - "us.grpc.Status\"\000\022G\n\021PreloadCollection\022\033." - "milvus.grpc.CollectionName\032\023.milvus.grpc" - ".Status\"\000\0227\n\005Flush\022\027.milvus.grpc.FlushPa" - "ram\032\023.milvus.grpc.Status\"\000\022=\n\007Compact\022\033." - "milvus.grpc.CollectionName\032\023.milvus.grpc" - ".Status\"\000\022E\n\026CreateHybridCollection\022\024.mi" - "lvus.grpc.Mapping\032\023.milvus.grpc.Status\"\000" - "\022L\n\023HasHybridCollection\022\033.milvus.grpc.Co" - "llectionName\032\026.milvus.grpc.BoolReply\"\000\022J" - "\n\024DropHybridCollection\022\033.milvus.grpc.Col" - "lectionName\032\023.milvus.grpc.Status\"\000\022O\n\030De" - "scribeHybridCollection\022\033.milvus.grpc.Col" - "lectionName\032\024.milvus.grpc.Mapping\"\000\022W\n\025C" - "ountHybridCollection\022\033.milvus.grpc.Colle" - "ctionName\032\037.milvus.grpc.CollectionRowCou" - "nt\"\000\022I\n\025ShowHybridCollections\022\024.milvus.g" - "rpc.Command\032\030.milvus.grpc.MappingList\"\000\022" - "V\n\030ShowHybridCollectionInfo\022\033.milvus.grp" - "c.CollectionName\032\033.milvus.grpc.Collectio" - "nInfo\"\000\022M\n\027PreloadHybridCollection\022\033.mil" - "vus.grpc.CollectionName\032\023.milvus.grpc.St" - "atus\"\000\022D\n\014InsertEntity\022\031.milvus.grpc.HIn" - "sertParam\032\027.milvus.grpc.HEntityIDs\"\000\022F\n\014" - "HybridSearch\022\031.milvus.grpc.HSearchParam\032" - "\031.milvus.grpc.HQueryResult\"\000\022]\n\026HybridSe" - "archInSegments\022#.milvus.grpc.HSearchInSe" - "gmentsParam\032\034.milvus.grpc.TopKQueryResul" - "t\"\000\022E\n\rGetEntityByID\022\034.milvus.grpc.Vecto" - "rsIdentity\032\024.milvus.grpc.HEntity\"\000\022J\n\014Ge" - "tEntityIDs\022\037.milvus.grpc.HGetEntityIDsPa" - "ram\032\027.milvus.grpc.HEntityIDs\"\000\022J\n\022Delete" - "EntitiesByID\022\035.milvus.grpc.HDeleteByIDPa" - "ram\032\023.milvus.grpc.Status\"\000b\006proto3" + "vus.grpc.VectorQueryH\000B\007\n\005query\"G\n\013Vecto" + "rParam\022\014\n\004json\030\001 \001(\t\022*\n\nrow_record\030\002 \003(\013" + "2\026.milvus.grpc.RowRecord\"\262\001\n\014HSearchPara" + "m\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023partition_" + "tag_array\030\002 \003(\t\022.\n\014vector_param\030\003 \003(\0132\030." + "milvus.grpc.VectorParam\022\013\n\003dsl\030\004 \001(\t\022/\n\014" + "extra_params\030\005 \003(\0132\031.milvus.grpc.KeyValu" + "ePair\"\251\001\n\016HSearchParamPB\022\027\n\017collection_n" + "ame\030\001 \001(\t\022\033\n\023partition_tag_array\030\002 \003(\t\0220" + "\n\rgeneral_query\030\003 \001(\0132\031.milvus.grpc.Gene" + "ralQuery\022/\n\014extra_params\030\004 \003(\0132\031.milvus." + "grpc.KeyValuePair\"e\n\026HSearchInSegmentsPa" + "ram\022\030\n\020segment_id_array\030\001 \003(\t\0221\n\014search_" + "param\030\002 \001(\0132\033.milvus.grpc.HSearchParamPB" + "\"5\n\nAttrRecord\022\021\n\tint_value\030\001 \003(\003\022\024\n\014dou" + "ble_value\030\002 \003(\001\"\363\001\n\007HEntity\022#\n\006status\030\001 " + "\001(\0132\023.milvus.grpc.Status\022\021\n\tentity_id\030\002 " + "\003(\003\022\023\n\013field_names\030\003 \003(\t\022)\n\ndata_types\030\004" + " \003(\0162\025.milvus.grpc.DataType\022\017\n\007row_num\030\005" + " \001(\003\022*\n\tattr_data\030\006 \003(\0132\027.milvus.grpc.At" + "trRecord\0223\n\013vector_data\030\007 \003(\0132\036.milvus.g" + "rpc.VectorFieldRecord\"\274\001\n\014HQueryResult\022#" + "\n\006status\030\001 \001(\0132\023.milvus.grpc.Status\022$\n\006e" + "ntity\030\002 \001(\0132\024.milvus.grpc.HEntity\022\017\n\007row" + "_num\030\003 \001(\003\022\r\n\005score\030\004 \003(\002\022\020\n\010distance\030\005 " + "\003(\002\022/\n\014extra_params\030\006 \003(\0132\031.milvus.grpc." + "KeyValuePair\"\256\001\n\014HInsertParam\022\027\n\017collect" + "ion_name\030\001 \001(\t\022\025\n\rpartition_tag\030\002 \001(\t\022$\n" + "\006entity\030\003 \001(\0132\024.milvus.grpc.HEntity\022\027\n\017e" + "ntity_id_array\030\004 \003(\003\022/\n\014extra_params\030\005 \003" + "(\0132\031.milvus.grpc.KeyValuePair\"6\n\017HEntity" + "Identity\022\027\n\017collection_name\030\001 \001(\t\022\n\n\002id\030" + "\002 \003(\003\"J\n\nHEntityIDs\022#\n\006status\030\001 \001(\0132\023.mi" + "lvus.grpc.Status\022\027\n\017entity_id_array\030\002 \003(" + "\003\"C\n\022HGetEntityIDsParam\022\027\n\017collection_na" + "me\030\001 \001(\t\022\024\n\014segment_name\030\002 \001(\t\"=\n\020HDelet" + "eByIDParam\022\027\n\017collection_name\030\001 \001(\t\022\020\n\010i" + "d_array\030\002 \003(\003\"\220\001\n\013HIndexParam\022#\n\006status\030" + "\001 \001(\0132\023.milvus.grpc.Status\022\027\n\017collection" + "_name\030\002 \001(\t\022\022\n\nindex_type\030\003 \001(\005\022/\n\014extra" + "_params\030\004 \003(\0132\031.milvus.grpc.KeyValuePair" + "*\206\001\n\010DataType\022\010\n\004NULL\020\000\022\010\n\004INT8\020\001\022\t\n\005INT" + "16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\n\n\006STRING\020\024\022\010" + "\n\004BOOL\020\036\022\t\n\005FLOAT\020(\022\n\n\006DOUBLE\020)\022\n\n\006VECTO" + "R\020d\022\014\n\007UNKNOWN\020\217N*C\n\017CompareOperator\022\006\n\002" + "LT\020\000\022\007\n\003LTE\020\001\022\006\n\002EQ\020\002\022\006\n\002GT\020\003\022\007\n\003GTE\020\004\022\006" + "\n\002NE\020\005*8\n\005Occur\022\013\n\007INVALID\020\000\022\010\n\004MUST\020\001\022\n" + "\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\0032\235\027\n\rMilvusServi" + "ce\022H\n\020CreateCollection\022\035.milvus.grpc.Col" + "lectionSchema\032\023.milvus.grpc.Status\"\000\022F\n\r" + "HasCollection\022\033.milvus.grpc.CollectionNa" + "me\032\026.milvus.grpc.BoolReply\"\000\022R\n\022Describe" + "Collection\022\033.milvus.grpc.CollectionName\032" + "\035.milvus.grpc.CollectionSchema\"\000\022Q\n\017Coun" + "tCollection\022\033.milvus.grpc.CollectionName" + "\032\037.milvus.grpc.CollectionRowCount\"\000\022J\n\017S" + "howCollections\022\024.milvus.grpc.Command\032\037.m" + "ilvus.grpc.CollectionNameList\"\000\022P\n\022ShowC" + "ollectionInfo\022\033.milvus.grpc.CollectionNa" + "me\032\033.milvus.grpc.CollectionInfo\"\000\022D\n\016Dro" + "pCollection\022\033.milvus.grpc.CollectionName" + "\032\023.milvus.grpc.Status\"\000\022=\n\013CreateIndex\022\027" + ".milvus.grpc.IndexParam\032\023.milvus.grpc.St" + "atus\"\000\022G\n\rDescribeIndex\022\033.milvus.grpc.Co" + "llectionName\032\027.milvus.grpc.IndexParam\"\000\022" + "\?\n\tDropIndex\022\033.milvus.grpc.CollectionNam" + "e\032\023.milvus.grpc.Status\"\000\022E\n\017CreatePartit" + "ion\022\033.milvus.grpc.PartitionParam\032\023.milvu" + "s.grpc.Status\"\000\022E\n\014HasPartition\022\033.milvus" + ".grpc.PartitionParam\032\026.milvus.grpc.BoolR" + "eply\"\000\022K\n\016ShowPartitions\022\033.milvus.grpc.C" + "ollectionName\032\032.milvus.grpc.PartitionLis" + "t\"\000\022C\n\rDropPartition\022\033.milvus.grpc.Parti" + "tionParam\032\023.milvus.grpc.Status\"\000\022<\n\006Inse" + "rt\022\030.milvus.grpc.InsertParam\032\026.milvus.gr" + "pc.VectorIds\"\000\022J\n\016GetVectorsByID\022\034.milvu" + "s.grpc.VectorsIdentity\032\030.milvus.grpc.Vec" + "torsData\"\000\022H\n\014GetVectorIDs\022\036.milvus.grpc" + ".GetVectorIDsParam\032\026.milvus.grpc.VectorI" + "ds\"\000\022B\n\006Search\022\030.milvus.grpc.SearchParam" + "\032\034.milvus.grpc.TopKQueryResult\"\000\022J\n\nSear" + "chByID\022\034.milvus.grpc.SearchByIDParam\032\034.m" + "ilvus.grpc.TopKQueryResult\"\000\022P\n\rSearchIn" + "Files\022\037.milvus.grpc.SearchInFilesParam\032\034" + ".milvus.grpc.TopKQueryResult\"\000\0227\n\003Cmd\022\024." + "milvus.grpc.Command\032\030.milvus.grpc.String" + "Reply\"\000\022A\n\nDeleteByID\022\034.milvus.grpc.Dele" + "teByIDParam\032\023.milvus.grpc.Status\"\000\022G\n\021Pr" + "eloadCollection\022\033.milvus.grpc.Collection" + "Name\032\023.milvus.grpc.Status\"\000\0227\n\005Flush\022\027.m" + "ilvus.grpc.FlushParam\032\023.milvus.grpc.Stat" + "us\"\000\022=\n\007Compact\022\033.milvus.grpc.Collection" + "Name\032\023.milvus.grpc.Status\"\000\022E\n\026CreateHyb" + "ridCollection\022\024.milvus.grpc.Mapping\032\023.mi" + "lvus.grpc.Status\"\000\022L\n\023HasHybridCollectio" + "n\022\033.milvus.grpc.CollectionName\032\026.milvus." + "grpc.BoolReply\"\000\022J\n\024DropHybridCollection" + "\022\033.milvus.grpc.CollectionName\032\023.milvus.g" + "rpc.Status\"\000\022O\n\030DescribeHybridCollection" + "\022\033.milvus.grpc.CollectionName\032\024.milvus.g" + "rpc.Mapping\"\000\022W\n\025CountHybridCollection\022\033" + ".milvus.grpc.CollectionName\032\037.milvus.grp" + "c.CollectionRowCount\"\000\022I\n\025ShowHybridColl" + "ections\022\024.milvus.grpc.Command\032\030.milvus.g" + "rpc.MappingList\"\000\022V\n\030ShowHybridCollectio" + "nInfo\022\033.milvus.grpc.CollectionName\032\033.mil" + "vus.grpc.CollectionInfo\"\000\022M\n\027PreloadHybr" + "idCollection\022\033.milvus.grpc.CollectionNam" + "e\032\023.milvus.grpc.Status\"\000\022D\n\014InsertEntity" + "\022\031.milvus.grpc.HInsertParam\032\027.milvus.grp" + "c.HEntityIDs\"\000\022J\n\016HybridSearchPB\022\033.milvu" + "s.grpc.HSearchParamPB\032\031.milvus.grpc.HQue" + "ryResult\"\000\022F\n\014HybridSearch\022\031.milvus.grpc" + ".HSearchParam\032\031.milvus.grpc.HQueryResult" + "\"\000\022]\n\026HybridSearchInSegments\022#.milvus.gr" + "pc.HSearchInSegmentsParam\032\034.milvus.grpc." + "TopKQueryResult\"\000\022E\n\rGetEntityByID\022\034.mil" + "vus.grpc.VectorsIdentity\032\024.milvus.grpc.H" + "Entity\"\000\022J\n\014GetEntityIDs\022\037.milvus.grpc.H" + "GetEntityIDsParam\032\027.milvus.grpc.HEntityI" + "Ds\"\000\022J\n\022DeleteEntitiesByID\022\035.milvus.grpc" + ".HDeleteByIDParam\032\023.milvus.grpc.Status\"\000" + "b\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[1] = { &::descriptor_table_status_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[47] = { +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[49] = { &scc_info_AttrRecord_milvus_2eproto.base, &scc_info_BoolReply_milvus_2eproto.base, &scc_info_BooleanQuery_milvus_2eproto.base, @@ -1688,6 +1758,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil &scc_info_HQueryResult_milvus_2eproto.base, &scc_info_HSearchInSegmentsParam_milvus_2eproto.base, &scc_info_HSearchParam_milvus_2eproto.base, + &scc_info_HSearchParamPB_milvus_2eproto.base, &scc_info_IndexParam_milvus_2eproto.base, &scc_info_InsertParam_milvus_2eproto.base, &scc_info_KeyValuePair_milvus_2eproto.base, @@ -1706,6 +1777,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil &scc_info_VectorFieldParam_milvus_2eproto.base, &scc_info_VectorFieldRecord_milvus_2eproto.base, &scc_info_VectorIds_milvus_2eproto.base, + &scc_info_VectorParam_milvus_2eproto.base, &scc_info_VectorQuery_milvus_2eproto.base, &scc_info_VectorsData_milvus_2eproto.base, &scc_info_VectorsIdentity_milvus_2eproto.base, @@ -1713,10 +1785,10 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once; static bool descriptor_table_milvus_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = { - &descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8354, - &descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 47, 1, + &descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8688, + &descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 49, 1, schemas, file_default_instances, TableStruct_milvus_2eproto::offsets, - file_level_metadata_milvus_2eproto, 48, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, + file_level_metadata_milvus_2eproto, 50, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. @@ -15618,129 +15690,90 @@ void GeneralQuery::InternalSwap(GeneralQuery* other) { // =================================================================== -void HSearchParam::InitAsDefaultInstance() { - ::milvus::grpc::_HSearchParam_default_instance_._instance.get_mutable()->general_query_ = const_cast< ::milvus::grpc::GeneralQuery*>( - ::milvus::grpc::GeneralQuery::internal_default_instance()); +void VectorParam::InitAsDefaultInstance() { } -class HSearchParam::_Internal { +class VectorParam::_Internal { public: - static const ::milvus::grpc::GeneralQuery& general_query(const HSearchParam* msg); }; -const ::milvus::grpc::GeneralQuery& -HSearchParam::_Internal::general_query(const HSearchParam* msg) { - return *msg->general_query_; -} -HSearchParam::HSearchParam() +VectorParam::VectorParam() : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(constructor:milvus.grpc.VectorParam) } -HSearchParam::HSearchParam(const HSearchParam& from) +VectorParam::VectorParam(const VectorParam& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), - partition_tag_array_(from.partition_tag_array_), - extra_params_(from.extra_params_) { + row_record_(from.row_record_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.collection_name().empty()) { - collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); - } - if (from.has_general_query()) { - general_query_ = new ::milvus::grpc::GeneralQuery(*from.general_query_); - } else { - general_query_ = nullptr; + json_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.json().empty()) { + json_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_); } - // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(copy_constructor:milvus.grpc.VectorParam) } -void HSearchParam::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParam_milvus_2eproto.base); - collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - general_query_ = nullptr; +void VectorParam::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_VectorParam_milvus_2eproto.base); + json_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -HSearchParam::~HSearchParam() { - // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParam) +VectorParam::~VectorParam() { + // @@protoc_insertion_point(destructor:milvus.grpc.VectorParam) SharedDtor(); } -void HSearchParam::SharedDtor() { - collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete general_query_; +void VectorParam::SharedDtor() { + json_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void HSearchParam::SetCachedSize(int size) const { +void VectorParam::SetCachedSize(int size) const { _cached_size_.Set(size); } -const HSearchParam& HSearchParam::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParam_milvus_2eproto.base); +const VectorParam& VectorParam::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_VectorParam_milvus_2eproto.base); return *internal_default_instance(); } -void HSearchParam::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParam) +void VectorParam::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - partition_tag_array_.Clear(); - extra_params_.Clear(); - collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { - delete general_query_; - } - general_query_ = nullptr; + row_record_.Clear(); + json_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* HSearchParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* VectorParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // string collection_name = 1; + // string json = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParam.collection_name"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_json(), ptr, ctx, "milvus.grpc.VectorParam.json"); CHK_(ptr); } else goto handle_unusual; continue; - // repeated string partition_tag_array = 2; + // repeated .milvus.grpc.RowRecord row_record = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParam.partition_tag_array"); + ptr = ctx->ParseMessage(add_row_record(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); } else goto handle_unusual; continue; - // .milvus.grpc.GeneralQuery general_query = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_general_query(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .milvus.grpc.KeyValuePair extra_params = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(add_extra_params(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); - } else goto handle_unusual; - continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -15761,63 +15794,36 @@ failure: #undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool HSearchParam::MergePartialFromCodedStream( +bool VectorParam::MergePartialFromCodedStream( ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_start:milvus.grpc.VectorParam) for (;;) { ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string collection_name = 1; + // string json = 1; case 1: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_collection_name())); + input, this->mutable_json())); DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.grpc.HSearchParam.collection_name")); + "milvus.grpc.VectorParam.json")); } else { goto handle_unusual; } break; } - // repeated string partition_tag_array = 2; + // repeated .milvus.grpc.RowRecord row_record = 2; case 2: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_partition_tag_array())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(this->partition_tag_array_size() - 1).data(), - static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.grpc.HSearchParam.partition_tag_array")); - } else { - goto handle_unusual; - } - break; - } - - // .milvus.grpc.GeneralQuery general_query = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_general_query())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .milvus.grpc.KeyValuePair extra_params = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_extra_params())); + input, add_row_record())); } else { goto handle_unusual; } @@ -15836,53 +15842,37 @@ bool HSearchParam::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_success:milvus.grpc.VectorParam) return true; failure: - // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_failure:milvus.grpc.VectorParam) return false; #undef DO_ } #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void HSearchParam::SerializeWithCachedSizes( +void VectorParam::SerializeWithCachedSizes( ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.collection_name"); + "milvus.grpc.VectorParam.json"); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->collection_name(), output); - } - - // repeated string partition_tag_array = 2; - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.partition_tag_array"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 2, this->partition_tag_array(i), output); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, _Internal::general_query(this), output); + 1, this->json(), output); } - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; for (unsigned int i = 0, - n = static_cast(this->extra_params_size()); i < n; i++) { + n = static_cast(this->row_record_size()); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->extra_params(static_cast(i)), + 2, + this->row_record(static_cast(i)), output); } @@ -15890,61 +15880,44 @@ void HSearchParam::SerializeWithCachedSizes( ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } - // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_end:milvus.grpc.VectorParam) } -::PROTOBUF_NAMESPACE_ID::uint8* HSearchParam::InternalSerializeWithCachedSizesToArray( +::PROTOBUF_NAMESPACE_ID::uint8* VectorParam::InternalSerializeWithCachedSizesToArray( ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.collection_name"); + "milvus.grpc.VectorParam.json"); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->collection_name(), target); - } - - // repeated string partition_tag_array = 2; - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.partition_tag_array"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(2, this->partition_tag_array(i), target); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, _Internal::general_query(this), target); + 1, this->json(), target); } - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; for (unsigned int i = 0, - n = static_cast(this->extra_params_size()); i < n; i++) { + n = static_cast(this->row_record_size()); i < n; i++) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 4, this->extra_params(static_cast(i)), target); + 2, this->row_record(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } - // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.VectorParam) return target; } -size_t HSearchParam::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParam) +size_t VectorParam::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.VectorParam) size_t total_size = 0; if (_internal_metadata_.have_unknown_fields()) { @@ -15956,37 +15929,22 @@ size_t HSearchParam::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated string partition_tag_array = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->partition_tag_array(i)); - } - - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; { - unsigned int count = static_cast(this->extra_params_size()); + unsigned int count = static_cast(this->row_record_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->extra_params(static_cast(i))); + this->row_record(static_cast(i))); } } - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->collection_name()); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *general_query_); + this->json()); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); @@ -15994,100 +15952,1040 @@ size_t HSearchParam::ByteSizeLong() const { return total_size; } -void HSearchParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParam) +void VectorParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.VectorParam) GOOGLE_DCHECK_NE(&from, this); - const HSearchParam* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const VectorParam* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.VectorParam) MergeFrom(*source); } } -void HSearchParam::MergeFrom(const HSearchParam& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParam) +void VectorParam::MergeFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.VectorParam) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - partition_tag_array_.MergeFrom(from.partition_tag_array_); - extra_params_.MergeFrom(from.extra_params_); - if (from.collection_name().size() > 0) { + row_record_.MergeFrom(from.row_record_); + if (from.json().size() > 0) { - collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); - } - if (from.has_general_query()) { - mutable_general_query()->::milvus::grpc::GeneralQuery::MergeFrom(from.general_query()); + json_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_); } } -void HSearchParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParam) +void VectorParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.VectorParam) if (&from == this) return; Clear(); MergeFrom(from); } -void HSearchParam::CopyFrom(const HSearchParam& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParam) +void VectorParam::CopyFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.VectorParam) if (&from == this) return; Clear(); MergeFrom(from); } -bool HSearchParam::IsInitialized() const { +bool VectorParam::IsInitialized() const { return true; } -void HSearchParam::InternalSwap(HSearchParam* other) { +void VectorParam::InternalSwap(VectorParam* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); - CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); - collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + CastToBase(&row_record_)->InternalSwap(CastToBase(&other->row_record_)); + json_.Swap(&other->json_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - swap(general_query_, other->general_query_); } -::PROTOBUF_NAMESPACE_ID::Metadata HSearchParam::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata VectorParam::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void HSearchInSegmentsParam::InitAsDefaultInstance() { - ::milvus::grpc::_HSearchInSegmentsParam_default_instance_._instance.get_mutable()->search_param_ = const_cast< ::milvus::grpc::HSearchParam*>( - ::milvus::grpc::HSearchParam::internal_default_instance()); +void HSearchParam::InitAsDefaultInstance() { } -class HSearchInSegmentsParam::_Internal { +class HSearchParam::_Internal { public: - static const ::milvus::grpc::HSearchParam& search_param(const HSearchInSegmentsParam* msg); }; -const ::milvus::grpc::HSearchParam& -HSearchInSegmentsParam::_Internal::search_param(const HSearchInSegmentsParam* msg) { - return *msg->search_param_; -} -HSearchInSegmentsParam::HSearchInSegmentsParam() +HSearchParam::HSearchParam() : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.grpc.HSearchInSegmentsParam) + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParam) } -HSearchInSegmentsParam::HSearchInSegmentsParam(const HSearchInSegmentsParam& from) +HSearchParam::HSearchParam(const HSearchParam& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), - segment_id_array_(from.segment_id_array_) { + partition_tag_array_(from.partition_tag_array_), + vector_param_(from.vector_param_), + extra_params_(from.extra_params_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_search_param()) { - search_param_ = new ::milvus::grpc::HSearchParam(*from.search_param_); - } else { + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.collection_name().empty()) { + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.dsl().empty()) { + dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_); + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParam) +} + +void HSearchParam::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParam_milvus_2eproto.base); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +HSearchParam::~HSearchParam() { + // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParam) + SharedDtor(); +} + +void HSearchParam::SharedDtor() { + collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HSearchParam::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HSearchParam& HSearchParam::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParam_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void HSearchParam::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + partition_tag_array_.Clear(); + vector_param_.Clear(); + extra_params_.Clear(); + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* HSearchParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string collection_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParam.collection_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string partition_tag_array = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParam.partition_tag_array"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.VectorParam vector_param = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_vector_param(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } else goto handle_unusual; + continue; + // string dsl = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_dsl(), ptr, ctx, "milvus.grpc.HSearchParam.dsl"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_extra_params(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool HSearchParam::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParam) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string collection_name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_collection_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.collection_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string partition_tag_array = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_partition_tag_array())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(this->partition_tag_array_size() - 1).data(), + static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.partition_tag_array")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_vector_param())); + } else { + goto handle_unusual; + } + break; + } + + // string dsl = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_dsl())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.dsl")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_extra_params())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParam) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParam) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void HSearchParam::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.collection_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->collection_name(), output); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.partition_tag_array"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 2, this->partition_tag_array(i), output); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + for (unsigned int i = 0, + n = static_cast(this->vector_param_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->vector_param(static_cast(i)), + output); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.dsl"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->dsl(), output); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, + this->extra_params(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParam) +} + +::PROTOBUF_NAMESPACE_ID::uint8* HSearchParam::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.collection_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->collection_name(), target); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.partition_tag_array"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(2, this->partition_tag_array(i), target); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + for (unsigned int i = 0, + n = static_cast(this->vector_param_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->vector_param(static_cast(i)), target); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.dsl"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 4, this->dsl(), target); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, this->extra_params(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParam) + return target; +} + +size_t HSearchParam::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParam) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string partition_tag_array = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->partition_tag_array(i)); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + { + unsigned int count = static_cast(this->vector_param_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->vector_param(static_cast(i))); + } + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + { + unsigned int count = static_cast(this->extra_params_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->extra_params(static_cast(i))); + } + } + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->collection_name()); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->dsl()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HSearchParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParam) + GOOGLE_DCHECK_NE(&from, this); + const HSearchParam* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParam) + MergeFrom(*source); + } +} + +void HSearchParam::MergeFrom(const HSearchParam& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParam) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + partition_tag_array_.MergeFrom(from.partition_tag_array_); + vector_param_.MergeFrom(from.vector_param_); + extra_params_.MergeFrom(from.extra_params_); + if (from.collection_name().size() > 0) { + + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.dsl().size() > 0) { + + dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_); + } +} + +void HSearchParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HSearchParam::CopyFrom(const HSearchParam& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HSearchParam::IsInitialized() const { + return true; +} + +void HSearchParam::InternalSwap(HSearchParam* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); + CastToBase(&vector_param_)->InternalSwap(CastToBase(&other->vector_param_)); + CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); + collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + dsl_.Swap(&other->dsl_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HSearchParam::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void HSearchParamPB::InitAsDefaultInstance() { + ::milvus::grpc::_HSearchParamPB_default_instance_._instance.get_mutable()->general_query_ = const_cast< ::milvus::grpc::GeneralQuery*>( + ::milvus::grpc::GeneralQuery::internal_default_instance()); +} +class HSearchParamPB::_Internal { + public: + static const ::milvus::grpc::GeneralQuery& general_query(const HSearchParamPB* msg); +}; + +const ::milvus::grpc::GeneralQuery& +HSearchParamPB::_Internal::general_query(const HSearchParamPB* msg) { + return *msg->general_query_; +} +HSearchParamPB::HSearchParamPB() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParamPB) +} +HSearchParamPB::HSearchParamPB(const HSearchParamPB& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + partition_tag_array_(from.partition_tag_array_), + extra_params_(from.extra_params_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.collection_name().empty()) { + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.has_general_query()) { + general_query_ = new ::milvus::grpc::GeneralQuery(*from.general_query_); + } else { + general_query_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParamPB) +} + +void HSearchParamPB::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParamPB_milvus_2eproto.base); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + general_query_ = nullptr; +} + +HSearchParamPB::~HSearchParamPB() { + // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParamPB) + SharedDtor(); +} + +void HSearchParamPB::SharedDtor() { + collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete general_query_; +} + +void HSearchParamPB::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HSearchParamPB& HSearchParamPB::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParamPB_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void HSearchParamPB::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + partition_tag_array_.Clear(); + extra_params_.Clear(); + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { + delete general_query_; + } + general_query_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* HSearchParamPB::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string collection_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParamPB.collection_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string partition_tag_array = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParamPB.partition_tag_array"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // .milvus.grpc.GeneralQuery general_query = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(mutable_general_query(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_extra_params(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool HSearchParamPB::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParamPB) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string collection_name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_collection_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParamPB.collection_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string partition_tag_array = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_partition_tag_array())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(this->partition_tag_array_size() - 1).data(), + static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParamPB.partition_tag_array")); + } else { + goto handle_unusual; + } + break; + } + + // .milvus.grpc.GeneralQuery general_query = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_general_query())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_extra_params())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParamPB) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParamPB) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void HSearchParamPB::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.collection_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->collection_name(), output); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.partition_tag_array"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 2, this->partition_tag_array(i), output); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, _Internal::general_query(this), output); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, + this->extra_params(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParamPB) +} + +::PROTOBUF_NAMESPACE_ID::uint8* HSearchParamPB::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.collection_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->collection_name(), target); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.partition_tag_array"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(2, this->partition_tag_array(i), target); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, _Internal::general_query(this), target); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 4, this->extra_params(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParamPB) + return target; +} + +size_t HSearchParamPB::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParamPB) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string partition_tag_array = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->partition_tag_array(i)); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + { + unsigned int count = static_cast(this->extra_params_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->extra_params(static_cast(i))); + } + } + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->collection_name()); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *general_query_); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HSearchParamPB::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParamPB) + GOOGLE_DCHECK_NE(&from, this); + const HSearchParamPB* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParamPB) + MergeFrom(*source); + } +} + +void HSearchParamPB::MergeFrom(const HSearchParamPB& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParamPB) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + partition_tag_array_.MergeFrom(from.partition_tag_array_); + extra_params_.MergeFrom(from.extra_params_); + if (from.collection_name().size() > 0) { + + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.has_general_query()) { + mutable_general_query()->::milvus::grpc::GeneralQuery::MergeFrom(from.general_query()); + } +} + +void HSearchParamPB::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParamPB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HSearchParamPB::CopyFrom(const HSearchParamPB& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParamPB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HSearchParamPB::IsInitialized() const { + return true; +} + +void HSearchParamPB::InternalSwap(HSearchParamPB* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); + CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); + collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(general_query_, other->general_query_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HSearchParamPB::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void HSearchInSegmentsParam::InitAsDefaultInstance() { + ::milvus::grpc::_HSearchInSegmentsParam_default_instance_._instance.get_mutable()->search_param_ = const_cast< ::milvus::grpc::HSearchParamPB*>( + ::milvus::grpc::HSearchParamPB::internal_default_instance()); +} +class HSearchInSegmentsParam::_Internal { + public: + static const ::milvus::grpc::HSearchParamPB& search_param(const HSearchInSegmentsParam* msg); +}; + +const ::milvus::grpc::HSearchParamPB& +HSearchInSegmentsParam::_Internal::search_param(const HSearchInSegmentsParam* msg) { + return *msg->search_param_; +} +HSearchInSegmentsParam::HSearchInSegmentsParam() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchInSegmentsParam) +} +HSearchInSegmentsParam::HSearchInSegmentsParam(const HSearchInSegmentsParam& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + segment_id_array_(from.segment_id_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_search_param()) { + search_param_ = new ::milvus::grpc::HSearchParamPB(*from.search_param_); + } else { search_param_ = nullptr; } // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchInSegmentsParam) @@ -16150,7 +17048,7 @@ const char* HSearchInSegmentsParam::_InternalParse(const char* ptr, ::PROTOBUF_N } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); } else goto handle_unusual; continue; - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(mutable_search_param(), ptr); @@ -16203,7 +17101,7 @@ bool HSearchInSegmentsParam::MergePartialFromCodedStream( break; } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; case 2: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( @@ -16251,7 +17149,7 @@ void HSearchInSegmentsParam::SerializeWithCachedSizes( 1, this->segment_id_array(i), output); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, _Internal::search_param(this), output); @@ -16280,7 +17178,7 @@ void HSearchInSegmentsParam::SerializeWithCachedSizes( WriteStringToArray(1, this->segment_id_array(i), target); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -16316,7 +17214,7 @@ size_t HSearchInSegmentsParam::ByteSizeLong() const { this->segment_id_array(i)); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -16352,7 +17250,7 @@ void HSearchInSegmentsParam::MergeFrom(const HSearchInSegmentsParam& from) { segment_id_array_.MergeFrom(from.segment_id_array_); if (from.has_search_param()) { - mutable_search_param()->::milvus::grpc::HSearchParam::MergeFrom(from.search_param()); + mutable_search_param()->::milvus::grpc::HSearchParamPB::MergeFrom(from.search_param()); } } @@ -20348,9 +21246,15 @@ template<> PROTOBUF_NOINLINE ::milvus::grpc::BooleanQuery* Arena::CreateMaybeMes template<> PROTOBUF_NOINLINE ::milvus::grpc::GeneralQuery* Arena::CreateMaybeMessage< ::milvus::grpc::GeneralQuery >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::GeneralQuery >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::grpc::VectorParam* Arena::CreateMaybeMessage< ::milvus::grpc::VectorParam >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::VectorParam >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchParam* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchParam >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::HSearchParam >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchParamPB* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchParamPB >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::HSearchParamPB >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchInSegmentsParam* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchInSegmentsParam >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::HSearchInSegmentsParam >(arena); } diff --git a/core/src/grpc/gen-milvus/milvus.pb.h b/core/src/grpc/gen-milvus/milvus.pb.h index 4088920a..202e3535 100644 --- a/core/src/grpc/gen-milvus/milvus.pb.h +++ b/core/src/grpc/gen-milvus/milvus.pb.h @@ -49,7 +49,7 @@ struct TableStruct_milvus_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[48] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[50] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -139,6 +139,9 @@ extern HSearchInSegmentsParamDefaultTypeInternal _HSearchInSegmentsParam_default class HSearchParam; class HSearchParamDefaultTypeInternal; extern HSearchParamDefaultTypeInternal _HSearchParam_default_instance_; +class HSearchParamPB; +class HSearchParamPBDefaultTypeInternal; +extern HSearchParamPBDefaultTypeInternal _HSearchParamPB_default_instance_; class IndexParam; class IndexParamDefaultTypeInternal; extern IndexParamDefaultTypeInternal _IndexParam_default_instance_; @@ -193,6 +196,9 @@ extern VectorFieldRecordDefaultTypeInternal _VectorFieldRecord_default_instance_ class VectorIds; class VectorIdsDefaultTypeInternal; extern VectorIdsDefaultTypeInternal _VectorIds_default_instance_; +class VectorParam; +class VectorParamDefaultTypeInternal; +extern VectorParamDefaultTypeInternal _VectorParam_default_instance_; class VectorQuery; class VectorQueryDefaultTypeInternal; extern VectorQueryDefaultTypeInternal _VectorQuery_default_instance_; @@ -232,6 +238,7 @@ template<> ::milvus::grpc::HInsertParam* Arena::CreateMaybeMessage<::milvus::grp template<> ::milvus::grpc::HQueryResult* Arena::CreateMaybeMessage<::milvus::grpc::HQueryResult>(Arena*); template<> ::milvus::grpc::HSearchInSegmentsParam* Arena::CreateMaybeMessage<::milvus::grpc::HSearchInSegmentsParam>(Arena*); template<> ::milvus::grpc::HSearchParam* Arena::CreateMaybeMessage<::milvus::grpc::HSearchParam>(Arena*); +template<> ::milvus::grpc::HSearchParamPB* Arena::CreateMaybeMessage<::milvus::grpc::HSearchParamPB>(Arena*); template<> ::milvus::grpc::IndexParam* Arena::CreateMaybeMessage<::milvus::grpc::IndexParam>(Arena*); template<> ::milvus::grpc::InsertParam* Arena::CreateMaybeMessage<::milvus::grpc::InsertParam>(Arena*); template<> ::milvus::grpc::KeyValuePair* Arena::CreateMaybeMessage<::milvus::grpc::KeyValuePair>(Arena*); @@ -250,6 +257,7 @@ template<> ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage<::milvus:: template<> ::milvus::grpc::VectorFieldParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldParam>(Arena*); template<> ::milvus::grpc::VectorFieldRecord* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldRecord>(Arena*); template<> ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage<::milvus::grpc::VectorIds>(Arena*); +template<> ::milvus::grpc::VectorParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorParam>(Arena*); template<> ::milvus::grpc::VectorQuery* Arena::CreateMaybeMessage<::milvus::grpc::VectorQuery>(Arena*); template<> ::milvus::grpc::VectorsData* Arena::CreateMaybeMessage<::milvus::grpc::VectorsData>(Arena*); template<> ::milvus::grpc::VectorsIdentity* Arena::CreateMaybeMessage<::milvus::grpc::VectorsIdentity>(Arena*); @@ -6213,6 +6221,156 @@ class GeneralQuery : }; // ------------------------------------------------------------------- +class VectorParam : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.VectorParam) */ { + public: + VectorParam(); + virtual ~VectorParam(); + + VectorParam(const VectorParam& from); + VectorParam(VectorParam&& from) noexcept + : VectorParam() { + *this = ::std::move(from); + } + + inline VectorParam& operator=(const VectorParam& from) { + CopyFrom(from); + return *this; + } + inline VectorParam& operator=(VectorParam&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const VectorParam& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VectorParam* internal_default_instance() { + return reinterpret_cast( + &_VectorParam_default_instance_); + } + static constexpr int kIndexInFileMessages = + 37; + + friend void swap(VectorParam& a, VectorParam& b) { + a.Swap(&b); + } + inline void Swap(VectorParam* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VectorParam* New() const final { + return CreateMaybeMessage(nullptr); + } + + VectorParam* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const VectorParam& from); + void MergeFrom(const VectorParam& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VectorParam* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.VectorParam"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRowRecordFieldNumber = 2, + kJsonFieldNumber = 1, + }; + // repeated .milvus.grpc.RowRecord row_record = 2; + int row_record_size() const; + void clear_row_record(); + ::milvus::grpc::RowRecord* mutable_row_record(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* + mutable_row_record(); + const ::milvus::grpc::RowRecord& row_record(int index) const; + ::milvus::grpc::RowRecord* add_row_record(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& + row_record() const; + + // string json = 1; + void clear_json(); + const std::string& json() const; + void set_json(const std::string& value); + void set_json(std::string&& value); + void set_json(const char* value); + void set_json(const char* value, size_t size); + std::string* mutable_json(); + std::string* release_json(); + void set_allocated_json(std::string* json); + + // @@protoc_insertion_point(class_scope:milvus.grpc.VectorParam) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord > row_record_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + class HSearchParam : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HSearchParam) */ { public: @@ -6255,7 +6413,7 @@ class HSearchParam : &_HSearchParam_default_instance_); } static constexpr int kIndexInFileMessages = - 37; + 38; friend void swap(HSearchParam& a, HSearchParam& b) { a.Swap(&b); @@ -6325,6 +6483,201 @@ class HSearchParam : // accessors ------------------------------------------------------- + enum : int { + kPartitionTagArrayFieldNumber = 2, + kVectorParamFieldNumber = 3, + kExtraParamsFieldNumber = 5, + kCollectionNameFieldNumber = 1, + kDslFieldNumber = 4, + }; + // repeated string partition_tag_array = 2; + int partition_tag_array_size() const; + void clear_partition_tag_array(); + const std::string& partition_tag_array(int index) const; + std::string* mutable_partition_tag_array(int index); + void set_partition_tag_array(int index, const std::string& value); + void set_partition_tag_array(int index, std::string&& value); + void set_partition_tag_array(int index, const char* value); + void set_partition_tag_array(int index, const char* value, size_t size); + std::string* add_partition_tag_array(); + void add_partition_tag_array(const std::string& value); + void add_partition_tag_array(std::string&& value); + void add_partition_tag_array(const char* value); + void add_partition_tag_array(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& partition_tag_array() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_partition_tag_array(); + + // repeated .milvus.grpc.VectorParam vector_param = 3; + int vector_param_size() const; + void clear_vector_param(); + ::milvus::grpc::VectorParam* mutable_vector_param(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >* + mutable_vector_param(); + const ::milvus::grpc::VectorParam& vector_param(int index) const; + ::milvus::grpc::VectorParam* add_vector_param(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >& + vector_param() const; + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + int extra_params_size() const; + void clear_extra_params(); + ::milvus::grpc::KeyValuePair* mutable_extra_params(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* + mutable_extra_params(); + const ::milvus::grpc::KeyValuePair& extra_params(int index) const; + ::milvus::grpc::KeyValuePair* add_extra_params(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& + extra_params() const; + + // string collection_name = 1; + void clear_collection_name(); + const std::string& collection_name() const; + void set_collection_name(const std::string& value); + void set_collection_name(std::string&& value); + void set_collection_name(const char* value); + void set_collection_name(const char* value, size_t size); + std::string* mutable_collection_name(); + std::string* release_collection_name(); + void set_allocated_collection_name(std::string* collection_name); + + // string dsl = 4; + void clear_dsl(); + const std::string& dsl() const; + void set_dsl(const std::string& value); + void set_dsl(std::string&& value); + void set_dsl(const char* value); + void set_dsl(const char* value, size_t size); + std::string* mutable_dsl(); + std::string* release_dsl(); + void set_allocated_dsl(std::string* dsl); + + // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParam) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField partition_tag_array_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam > vector_param_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair > extra_params_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collection_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dsl_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class HSearchParamPB : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HSearchParamPB) */ { + public: + HSearchParamPB(); + virtual ~HSearchParamPB(); + + HSearchParamPB(const HSearchParamPB& from); + HSearchParamPB(HSearchParamPB&& from) noexcept + : HSearchParamPB() { + *this = ::std::move(from); + } + + inline HSearchParamPB& operator=(const HSearchParamPB& from) { + CopyFrom(from); + return *this; + } + inline HSearchParamPB& operator=(HSearchParamPB&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const HSearchParamPB& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HSearchParamPB* internal_default_instance() { + return reinterpret_cast( + &_HSearchParamPB_default_instance_); + } + static constexpr int kIndexInFileMessages = + 39; + + friend void swap(HSearchParamPB& a, HSearchParamPB& b) { + a.Swap(&b); + } + inline void Swap(HSearchParamPB* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline HSearchParamPB* New() const final { + return CreateMaybeMessage(nullptr); + } + + HSearchParamPB* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const HSearchParamPB& from); + void MergeFrom(const HSearchParamPB& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HSearchParamPB* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.HSearchParamPB"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { kPartitionTagArrayFieldNumber = 2, kExtraParamsFieldNumber = 4, @@ -6378,7 +6731,7 @@ class HSearchParam : ::milvus::grpc::GeneralQuery* mutable_general_query(); void set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query); - // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParamPB) private: class _Internal; @@ -6434,7 +6787,7 @@ class HSearchInSegmentsParam : &_HSearchInSegmentsParam_default_instance_); } static constexpr int kIndexInFileMessages = - 38; + 40; friend void swap(HSearchInSegmentsParam& a, HSearchInSegmentsParam& b) { a.Swap(&b); @@ -6525,13 +6878,13 @@ class HSearchInSegmentsParam : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& segment_id_array() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_segment_id_array(); - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; bool has_search_param() const; void clear_search_param(); - const ::milvus::grpc::HSearchParam& search_param() const; - ::milvus::grpc::HSearchParam* release_search_param(); - ::milvus::grpc::HSearchParam* mutable_search_param(); - void set_allocated_search_param(::milvus::grpc::HSearchParam* search_param); + const ::milvus::grpc::HSearchParamPB& search_param() const; + ::milvus::grpc::HSearchParamPB* release_search_param(); + ::milvus::grpc::HSearchParamPB* mutable_search_param(); + void set_allocated_search_param(::milvus::grpc::HSearchParamPB* search_param); // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchInSegmentsParam) private: @@ -6539,7 +6892,7 @@ class HSearchInSegmentsParam : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField segment_id_array_; - ::milvus::grpc::HSearchParam* search_param_; + ::milvus::grpc::HSearchParamPB* search_param_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -6587,7 +6940,7 @@ class AttrRecord : &_AttrRecord_default_instance_); } static constexpr int kIndexInFileMessages = - 39; + 41; friend void swap(AttrRecord& a, AttrRecord& b) { a.Swap(&b); @@ -6739,7 +7092,7 @@ class HEntity : &_HEntity_default_instance_); } static constexpr int kIndexInFileMessages = - 40; + 42; friend void swap(HEntity& a, HEntity& b) { a.Swap(&b); @@ -6951,7 +7304,7 @@ class HQueryResult : &_HQueryResult_default_instance_); } static constexpr int kIndexInFileMessages = - 41; + 43; friend void swap(HQueryResult& a, HQueryResult& b) { a.Swap(&b); @@ -7143,7 +7496,7 @@ class HInsertParam : &_HInsertParam_default_instance_); } static constexpr int kIndexInFileMessages = - 42; + 44; friend void swap(HInsertParam& a, HInsertParam& b) { a.Swap(&b); @@ -7330,7 +7683,7 @@ class HEntityIdentity : &_HEntityIdentity_default_instance_); } static constexpr int kIndexInFileMessages = - 43; + 45; friend void swap(HEntityIdentity& a, HEntityIdentity& b) { a.Swap(&b); @@ -7481,7 +7834,7 @@ class HEntityIDs : &_HEntityIDs_default_instance_); } static constexpr int kIndexInFileMessages = - 44; + 46; friend void swap(HEntityIDs& a, HEntityIDs& b) { a.Swap(&b); @@ -7629,7 +7982,7 @@ class HGetEntityIDsParam : &_HGetEntityIDsParam_default_instance_); } static constexpr int kIndexInFileMessages = - 45; + 47; friend void swap(HGetEntityIDsParam& a, HGetEntityIDsParam& b) { a.Swap(&b); @@ -7779,7 +8132,7 @@ class HDeleteByIDParam : &_HDeleteByIDParam_default_instance_); } static constexpr int kIndexInFileMessages = - 46; + 48; friend void swap(HDeleteByIDParam& a, HDeleteByIDParam& b) { a.Swap(&b); @@ -7930,7 +8283,7 @@ class HIndexParam : &_HIndexParam_default_instance_); } static constexpr int kIndexInFileMessages = - 47; + 49; friend void swap(HIndexParam& a, HIndexParam& b) { a.Swap(&b); @@ -12147,6 +12500,91 @@ inline GeneralQuery::QueryCase GeneralQuery::query_case() const { } // ------------------------------------------------------------------- +// VectorParam + +// string json = 1; +inline void VectorParam::clear_json() { + json_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& VectorParam::json() const { + // @@protoc_insertion_point(field_get:milvus.grpc.VectorParam.json) + return json_.GetNoArena(); +} +inline void VectorParam::set_json(const std::string& value) { + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(std::string&& value) { + + json_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(const char* value, size_t size) { + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.VectorParam.json) +} +inline std::string* VectorParam::mutable_json() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorParam.json) + return json_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* VectorParam::release_json() { + // @@protoc_insertion_point(field_release:milvus.grpc.VectorParam.json) + + return json_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorParam::set_allocated_json(std::string* json) { + if (json != nullptr) { + + } else { + + } + json_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.VectorParam.json) +} + +// repeated .milvus.grpc.RowRecord row_record = 2; +inline int VectorParam::row_record_size() const { + return row_record_.size(); +} +inline void VectorParam::clear_row_record() { + row_record_.Clear(); +} +inline ::milvus::grpc::RowRecord* VectorParam::mutable_row_record(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorParam.row_record) + return row_record_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* +VectorParam::mutable_row_record() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.VectorParam.row_record) + return &row_record_; +} +inline const ::milvus::grpc::RowRecord& VectorParam::row_record(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.VectorParam.row_record) + return row_record_.Get(index); +} +inline ::milvus::grpc::RowRecord* VectorParam::add_row_record() { + // @@protoc_insertion_point(field_add:milvus.grpc.VectorParam.row_record) + return row_record_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& +VectorParam::row_record() const { + // @@protoc_insertion_point(field_list:milvus.grpc.VectorParam.row_record) + return row_record_; +} + +// ------------------------------------------------------------------- + // HSearchParam // string collection_name = 1; @@ -12265,39 +12703,270 @@ HSearchParam::mutable_partition_tag_array() { return &partition_tag_array_; } +// repeated .milvus.grpc.VectorParam vector_param = 3; +inline int HSearchParam::vector_param_size() const { + return vector_param_.size(); +} +inline void HSearchParam::clear_vector_param() { + vector_param_.Clear(); +} +inline ::milvus::grpc::VectorParam* HSearchParam::mutable_vector_param(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >* +HSearchParam::mutable_vector_param() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.vector_param) + return &vector_param_; +} +inline const ::milvus::grpc::VectorParam& HSearchParam::vector_param(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Get(index); +} +inline ::milvus::grpc::VectorParam* HSearchParam::add_vector_param() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >& +HSearchParam::vector_param() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.vector_param) + return vector_param_; +} + +// string dsl = 4; +inline void HSearchParam::clear_dsl() { + dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& HSearchParam::dsl() const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.dsl) + return dsl_.GetNoArena(); +} +inline void HSearchParam::set_dsl(const std::string& value) { + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(std::string&& value) { + + dsl_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(const char* value, size_t size) { + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParam.dsl) +} +inline std::string* HSearchParam::mutable_dsl() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.dsl) + return dsl_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* HSearchParam::release_dsl() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParam.dsl) + + return dsl_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void HSearchParam::set_allocated_dsl(std::string* dsl) { + if (dsl != nullptr) { + + } else { + + } + dsl_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), dsl); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParam.dsl) +} + +// repeated .milvus.grpc.KeyValuePair extra_params = 5; +inline int HSearchParam::extra_params_size() const { + return extra_params_.size(); +} +inline void HSearchParam::clear_extra_params() { + extra_params_.Clear(); +} +inline ::milvus::grpc::KeyValuePair* HSearchParam::mutable_extra_params(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* +HSearchParam::mutable_extra_params() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.extra_params) + return &extra_params_; +} +inline const ::milvus::grpc::KeyValuePair& HSearchParam::extra_params(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Get(index); +} +inline ::milvus::grpc::KeyValuePair* HSearchParam::add_extra_params() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& +HSearchParam::extra_params() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.extra_params) + return extra_params_; +} + +// ------------------------------------------------------------------- + +// HSearchParamPB + +// string collection_name = 1; +inline void HSearchParamPB::clear_collection_name() { + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& HSearchParamPB::collection_name() const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.collection_name) + return collection_name_.GetNoArena(); +} +inline void HSearchParamPB::set_collection_name(const std::string& value) { + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(std::string&& value) { + + collection_name_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(const char* value, size_t size) { + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParamPB.collection_name) +} +inline std::string* HSearchParamPB::mutable_collection_name() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.collection_name) + return collection_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* HSearchParamPB::release_collection_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParamPB.collection_name) + + return collection_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void HSearchParamPB::set_allocated_collection_name(std::string* collection_name) { + if (collection_name != nullptr) { + + } else { + + } + collection_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), collection_name); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParamPB.collection_name) +} + +// repeated string partition_tag_array = 2; +inline int HSearchParamPB::partition_tag_array_size() const { + return partition_tag_array_.size(); +} +inline void HSearchParamPB::clear_partition_tag_array() { + partition_tag_array_.Clear(); +} +inline const std::string& HSearchParamPB::partition_tag_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Get(index); +} +inline std::string* HSearchParamPB::mutable_partition_tag_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Mutable(index); +} +inline void HSearchParamPB::set_partition_tag_array(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.partition_tag_array) + partition_tag_array_.Mutable(index)->assign(value); +} +inline void HSearchParamPB::set_partition_tag_array(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.partition_tag_array) + partition_tag_array_.Mutable(index)->assign(std::move(value)); +} +inline void HSearchParamPB::set_partition_tag_array(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + partition_tag_array_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::set_partition_tag_array(int index, const char* value, size_t size) { + partition_tag_array_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline std::string* HSearchParamPB::add_partition_tag_array() { + // @@protoc_insertion_point(field_add_mutable:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Add(); +} +inline void HSearchParamPB::add_partition_tag_array(const std::string& value) { + partition_tag_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(std::string&& value) { + partition_tag_array_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(const char* value) { + GOOGLE_DCHECK(value != nullptr); + partition_tag_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(const char* value, size_t size) { + partition_tag_array_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +HSearchParamPB::partition_tag_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +HSearchParamPB::mutable_partition_tag_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParamPB.partition_tag_array) + return &partition_tag_array_; +} + // .milvus.grpc.GeneralQuery general_query = 3; -inline bool HSearchParam::has_general_query() const { +inline bool HSearchParamPB::has_general_query() const { return this != internal_default_instance() && general_query_ != nullptr; } -inline void HSearchParam::clear_general_query() { +inline void HSearchParamPB::clear_general_query() { if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { delete general_query_; } general_query_ = nullptr; } -inline const ::milvus::grpc::GeneralQuery& HSearchParam::general_query() const { +inline const ::milvus::grpc::GeneralQuery& HSearchParamPB::general_query() const { const ::milvus::grpc::GeneralQuery* p = general_query_; - // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.general_query) return p != nullptr ? *p : *reinterpret_cast( &::milvus::grpc::_GeneralQuery_default_instance_); } -inline ::milvus::grpc::GeneralQuery* HSearchParam::release_general_query() { - // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParam.general_query) +inline ::milvus::grpc::GeneralQuery* HSearchParamPB::release_general_query() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParamPB.general_query) ::milvus::grpc::GeneralQuery* temp = general_query_; general_query_ = nullptr; return temp; } -inline ::milvus::grpc::GeneralQuery* HSearchParam::mutable_general_query() { +inline ::milvus::grpc::GeneralQuery* HSearchParamPB::mutable_general_query() { if (general_query_ == nullptr) { auto* p = CreateMaybeMessage<::milvus::grpc::GeneralQuery>(GetArenaNoVirtual()); general_query_ = p; } - // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.general_query) return general_query_; } -inline void HSearchParam::set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query) { +inline void HSearchParamPB::set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete general_query_; @@ -12313,36 +12982,36 @@ inline void HSearchParam::set_allocated_general_query(::milvus::grpc::GeneralQue } general_query_ = general_query; - // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParamPB.general_query) } // repeated .milvus.grpc.KeyValuePair extra_params = 4; -inline int HSearchParam::extra_params_size() const { +inline int HSearchParamPB::extra_params_size() const { return extra_params_.size(); } -inline void HSearchParam::clear_extra_params() { +inline void HSearchParamPB::clear_extra_params() { extra_params_.Clear(); } -inline ::milvus::grpc::KeyValuePair* HSearchParam::mutable_extra_params(int index) { - // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.extra_params) +inline ::milvus::grpc::KeyValuePair* HSearchParamPB::mutable_extra_params(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Mutable(index); } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* -HSearchParam::mutable_extra_params() { - // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.extra_params) +HSearchParamPB::mutable_extra_params() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParamPB.extra_params) return &extra_params_; } -inline const ::milvus::grpc::KeyValuePair& HSearchParam::extra_params(int index) const { - // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.extra_params) +inline const ::milvus::grpc::KeyValuePair& HSearchParamPB::extra_params(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Get(index); } -inline ::milvus::grpc::KeyValuePair* HSearchParam::add_extra_params() { - // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.extra_params) +inline ::milvus::grpc::KeyValuePair* HSearchParamPB::add_extra_params() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Add(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& -HSearchParam::extra_params() const { - // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.extra_params) +HSearchParamPB::extra_params() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParamPB.extra_params) return extra_params_; } @@ -12415,7 +13084,7 @@ HSearchInSegmentsParam::mutable_segment_id_array() { return &segment_id_array_; } -// .milvus.grpc.HSearchParam search_param = 2; +// .milvus.grpc.HSearchParamPB search_param = 2; inline bool HSearchInSegmentsParam::has_search_param() const { return this != internal_default_instance() && search_param_ != nullptr; } @@ -12425,29 +13094,29 @@ inline void HSearchInSegmentsParam::clear_search_param() { } search_param_ = nullptr; } -inline const ::milvus::grpc::HSearchParam& HSearchInSegmentsParam::search_param() const { - const ::milvus::grpc::HSearchParam* p = search_param_; +inline const ::milvus::grpc::HSearchParamPB& HSearchInSegmentsParam::search_param() const { + const ::milvus::grpc::HSearchParamPB* p = search_param_; // @@protoc_insertion_point(field_get:milvus.grpc.HSearchInSegmentsParam.search_param) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::grpc::_HSearchParam_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_HSearchParamPB_default_instance_); } -inline ::milvus::grpc::HSearchParam* HSearchInSegmentsParam::release_search_param() { +inline ::milvus::grpc::HSearchParamPB* HSearchInSegmentsParam::release_search_param() { // @@protoc_insertion_point(field_release:milvus.grpc.HSearchInSegmentsParam.search_param) - ::milvus::grpc::HSearchParam* temp = search_param_; + ::milvus::grpc::HSearchParamPB* temp = search_param_; search_param_ = nullptr; return temp; } -inline ::milvus::grpc::HSearchParam* HSearchInSegmentsParam::mutable_search_param() { +inline ::milvus::grpc::HSearchParamPB* HSearchInSegmentsParam::mutable_search_param() { if (search_param_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::grpc::HSearchParam>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::HSearchParamPB>(GetArenaNoVirtual()); search_param_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchInSegmentsParam.search_param) return search_param_; } -inline void HSearchInSegmentsParam::set_allocated_search_param(::milvus::grpc::HSearchParam* search_param) { +inline void HSearchInSegmentsParam::set_allocated_search_param(::milvus::grpc::HSearchParamPB* search_param) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete search_param_; @@ -13795,6 +14464,10 @@ HIndexParam::extra_params() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/core/src/grpc/milvus.proto b/core/src/grpc/milvus.proto index e5582800..5d5e49bd 100644 --- a/core/src/grpc/milvus.proto +++ b/core/src/grpc/milvus.proto @@ -342,7 +342,20 @@ message GeneralQuery { } } +message VectorParam { + string json = 1; + repeated RowRecord row_record = 2; +} + message HSearchParam { + string collection_name = 1; + repeated string partition_tag_array = 2; + repeated VectorParam vector_param = 3; + string dsl = 4; + repeated KeyValuePair extra_params = 5; +} + +message HSearchParamPB { string collection_name = 1; repeated string partition_tag_array = 2; GeneralQuery general_query = 3; @@ -351,7 +364,7 @@ message HSearchParam { message HSearchInSegmentsParam { repeated string segment_id_array = 1; - HSearchParam search_param = 2; + HSearchParamPB search_param = 2; } /////////////////////////////////////////////////////////////////// @@ -664,16 +677,18 @@ service MilvusService { /////////////////////////////////////////////////////////////////// -// rpc CreateIndex(IndexParam) returns (Status) {} -// -// rpc DescribeIndex(CollectionName) returns (IndexParam) {} -// -// rpc DropIndex(CollectionName) returns (Status) {} + // rpc CreateIndex(IndexParam) returns (Status) {} + // + // rpc DescribeIndex(CollectionName) returns (IndexParam) {} + // + // rpc DropIndex(CollectionName) returns (Status) {} /////////////////////////////////////////////////////////////////// rpc InsertEntity(HInsertParam) returns (HEntityIDs) {} + rpc HybridSearchPB(HSearchParamPB) returns (HQueryResult) {} + rpc HybridSearch(HSearchParam) returns (HQueryResult) {} rpc HybridSearchInSegments(HSearchInSegmentsParam) returns (TopKQueryResult) {} diff --git a/core/src/query/BinaryQuery.cpp b/core/src/query/BinaryQuery.cpp index 29f36066..07609486 100644 --- a/core/src/query/BinaryQuery.cpp +++ b/core/src/query/BinaryQuery.cpp @@ -67,7 +67,7 @@ GenBinaryQuery(BooleanQueryPtr query, BinaryQueryPtr& binary_query) { // Put VectorQuery to the end of leaf queries auto query_size = query->getLeafQueries().size(); for (uint64_t i = 0; i < query_size; ++i) { - if (query->getLeafQueries()[i]->vector_query != nullptr) { + if (query->getLeafQueries()[i]->vector_placeholder.size() > 0) { std::swap(query->getLeafQueries()[i], query->getLeafQueries()[0]); break; } diff --git a/core/src/query/GeneralQuery.h b/core/src/query/GeneralQuery.h index 41b9d5c5..2756ddb4 100644 --- a/core/src/query/GeneralQuery.h +++ b/core/src/query/GeneralQuery.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "utils/Json.h" @@ -92,7 +93,7 @@ using GeneralQueryPtr = std::shared_ptr; struct LeafQuery { TermQueryPtr term_query; RangeQueryPtr range_query; - VectorQueryPtr vector_query; + std::string vector_placeholder; float query_boost; }; @@ -103,5 +104,11 @@ struct BinaryQuery { float query_boost; }; +struct Query { + BinaryQueryPtr root; + std::unordered_map vectors; +}; +using QueryPtr = std::shared_ptr; + } // namespace query } // namespace milvus diff --git a/core/src/scheduler/job/SearchJob.cpp b/core/src/scheduler/job/SearchJob.cpp index 6f1e446a..9b0ec0d7 100644 --- a/core/src/scheduler/job/SearchJob.cpp +++ b/core/src/scheduler/job/SearchJob.cpp @@ -22,9 +22,15 @@ SearchJob::SearchJob(const std::shared_ptr& context, uint64_t t } SearchJob::SearchJob(const std::shared_ptr& context, milvus::query::GeneralQueryPtr general_query, + query::QueryPtr query_ptr, std::unordered_map& attr_type, const engine::VectorsData& vectors) - : Job(JobType::SEARCH), context_(context), general_query_(general_query), attr_type_(attr_type), vectors_(vectors) { + : Job(JobType::SEARCH), + context_(context), + general_query_(general_query), + query_ptr_(query_ptr), + attr_type_(attr_type), + vectors_(vectors) { } bool diff --git a/core/src/scheduler/job/SearchJob.h b/core/src/scheduler/job/SearchJob.h index 429acd18..1cb28741 100644 --- a/core/src/scheduler/job/SearchJob.h +++ b/core/src/scheduler/job/SearchJob.h @@ -46,7 +46,7 @@ class SearchJob : public Job { const engine::VectorsData& vectors); SearchJob(const std::shared_ptr& context, query::GeneralQueryPtr general_query, - std::unordered_map& attr_type, + query::QueryPtr query_ptr, std::unordered_map& attr_type, const engine::VectorsData& vectorsData); public: @@ -110,6 +110,11 @@ class SearchJob : public Job { return general_query_; } + query::QueryPtr + query_ptr() { + return query_ptr_; + } + std::unordered_map& attr_type() { return attr_type_; @@ -135,6 +140,7 @@ class SearchJob : public Job { Status status_; query::GeneralQueryPtr general_query_; + query::QueryPtr query_ptr_; std::unordered_map attr_type_; uint64_t vector_count_; diff --git a/core/src/scheduler/task/SearchTask.cpp b/core/src/scheduler/task/SearchTask.cpp index 70a8e22a..caa30c7a 100644 --- a/core/src/scheduler/task/SearchTask.cpp +++ b/core/src/scheduler/task/SearchTask.cpp @@ -267,7 +267,13 @@ XSearchTask::Execute() { for (; type_it != attr_type.end(); type_it++) { types.insert(std::make_pair(type_it->first, (engine::DataType)(type_it->second))); } - s = index_engine_->HybridSearch(general_query, types, nq, topk, output_distance, output_ids); + + auto query_ptr = search_job->query_ptr(); + + s = index_engine_->HybridSearch(general_query, types, query_ptr, output_distance, output_ids); + auto vector_query = query_ptr->vectors.begin()->second; + topk = vector_query->topk; + nq = vector_query->query_vector.float_data.size() / file_->dimension_; if (!s.ok()) { search_job->GetStatus() = s; diff --git a/core/src/server/delivery/RequestHandler.cpp b/core/src/server/delivery/RequestHandler.cpp index 0fb64e98..2c09dc2f 100644 --- a/core/src/server/delivery/RequestHandler.cpp +++ b/core/src/server/delivery/RequestHandler.cpp @@ -316,14 +316,12 @@ RequestHandler::GetEntityByID(const std::shared_ptr& context, const std } Status -RequestHandler::HybridSearch(const std::shared_ptr& context, - context::HybridSearchContextPtr hybrid_search_context, const std::string& collection_name, - std::vector& partition_list, milvus::query::GeneralQueryPtr& general_query, - milvus::json& json_params, std::vector& field_names, - engine::QueryResult& result) { - BaseRequestPtr request_ptr = - HybridSearchRequest::Create(context, hybrid_search_context, collection_name, partition_list, general_query, - json_params, field_names, result); +RequestHandler::HybridSearch(const std::shared_ptr& context, const std::string& collection_name, + std::vector& partition_list, query::GeneralQueryPtr& general_query, + query::QueryPtr& query_ptr, milvus::json& json_params, + std::vector& field_names, engine::QueryResult& result) { + BaseRequestPtr request_ptr = HybridSearchRequest::Create(context, collection_name, partition_list, general_query, + query_ptr, json_params, field_names, result); RequestScheduler::ExecRequest(request_ptr); diff --git a/core/src/server/delivery/RequestHandler.h b/core/src/server/delivery/RequestHandler.h index 3fa1e68f..3468624c 100644 --- a/core/src/server/delivery/RequestHandler.h +++ b/core/src/server/delivery/RequestHandler.h @@ -146,10 +146,10 @@ class RequestHandler { std::vector& vectors); Status - HybridSearch(const std::shared_ptr& context, context::HybridSearchContextPtr hybrid_search_context, - const std::string& collection_name, std::vector& partition_list, - query::GeneralQueryPtr& general_query, milvus::json& json_params, - std::vector& field_names, engine::QueryResult& result); + HybridSearch(const std::shared_ptr& context, const std::string& collection_name, + std::vector& partition_list, query::GeneralQueryPtr& general_query, + query::QueryPtr& query_ptr, milvus::json& json_params, std::vector& field_names, + engine::QueryResult& result); }; } // namespace server diff --git a/core/src/server/delivery/hybrid_request/HybridSearchRequest.cpp b/core/src/server/delivery/hybrid_request/HybridSearchRequest.cpp index 9cffe607..39147d0c 100644 --- a/core/src/server/delivery/hybrid_request/HybridSearchRequest.cpp +++ b/core/src/server/delivery/hybrid_request/HybridSearchRequest.cpp @@ -31,28 +31,26 @@ namespace milvus { namespace server { HybridSearchRequest::HybridSearchRequest(const std::shared_ptr& context, - context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name, std::vector& partition_list, - milvus::query::GeneralQueryPtr& general_query, milvus::json& json_params, - std::vector& field_names, engine::QueryResult& result) + query::GeneralQueryPtr& general_query, query::QueryPtr& query_ptr, + milvus::json& json_params, std::vector& field_names, + engine::QueryResult& result) : BaseRequest(context, BaseRequest::kHybridSearch), - hybrid_search_context_(hybrid_search_context), collection_name_(collection_name), partition_list_(partition_list), general_query_(general_query), + query_ptr_(query_ptr), field_names_(field_names), result_(result) { } BaseRequestPtr -HybridSearchRequest::Create(const std::shared_ptr& context, - context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name, - std::vector& partition_list, milvus::query::GeneralQueryPtr& general_query, - milvus::json& json_params, std::vector& field_names, - engine::QueryResult& result) { - return std::shared_ptr(new HybridSearchRequest(context, hybrid_search_context, collection_name, - partition_list, general_query, json_params, field_names, - result)); +HybridSearchRequest::Create(const std::shared_ptr& context, const std::string& collection_name, + std::vector& partition_list, query::GeneralQueryPtr& general_query, + query::QueryPtr& query_ptr, milvus::json& json_params, + std::vector& field_names, engine::QueryResult& result) { + return std::shared_ptr(new HybridSearchRequest(context, collection_name, partition_list, general_query, + query_ptr, json_params, field_names, result)); } Status @@ -106,8 +104,8 @@ HybridSearchRequest::OnExecute() { } } - status = DBWrapper::DB()->HybridQuery(context_, collection_name_, partition_list_, hybrid_search_context_, - general_query_, field_names_, attr_type, result_); + status = DBWrapper::DB()->HybridQuery(context_, collection_name_, partition_list_, general_query_, query_ptr_, + field_names_, attr_type, result_); #ifdef ENABLE_CPU_PROFILING ProfilerStop(); diff --git a/core/src/server/delivery/hybrid_request/HybridSearchRequest.h b/core/src/server/delivery/hybrid_request/HybridSearchRequest.h index 814335b8..d64a0940 100644 --- a/core/src/server/delivery/hybrid_request/HybridSearchRequest.h +++ b/core/src/server/delivery/hybrid_request/HybridSearchRequest.h @@ -24,25 +24,24 @@ namespace server { class HybridSearchRequest : public BaseRequest { public: static BaseRequestPtr - Create(const std::shared_ptr& context, - context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name, - std::vector& partition_list, milvus::query::GeneralQueryPtr& general_query, + Create(const std::shared_ptr& context, const std::string& collection_name, + std::vector& partition_list, query::GeneralQueryPtr& general_query, query::QueryPtr& query_ptr, milvus::json& json_params, std::vector& field_names, engine::QueryResult& result); protected: - HybridSearchRequest(const std::shared_ptr& context, - context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name, - std::vector& partition_list, milvus::query::GeneralQueryPtr& general_query, - milvus::json& json_params, std::vector& field_names, engine::QueryResult& result); + HybridSearchRequest(const std::shared_ptr& context, const std::string& collection_name, + std::vector& partition_list, query::GeneralQueryPtr& general_query, + query::QueryPtr& query_ptr, milvus::json& json_params, std::vector& field_names, + engine::QueryResult& result); Status OnExecute() override; private: - context::HybridSearchContextPtr hybrid_search_context_; const std::string collection_name_; std::vector partition_list_; milvus::query::GeneralQueryPtr general_query_; + milvus::query::QueryPtr query_ptr_; milvus::json json_params; std::vector& field_names_; engine::QueryResult& result_; diff --git a/core/src/server/grpc_impl/GrpcRequestHandler.cpp b/core/src/server/grpc_impl/GrpcRequestHandler.cpp index 916619af..46c39111 100644 --- a/core/src/server/grpc_impl/GrpcRequestHandler.cpp +++ b/core/src/server/grpc_impl/GrpcRequestHandler.cpp @@ -133,6 +133,85 @@ CopyRowRecords(const google::protobuf::RepeatedPtrField<::milvus::grpc::RowRecor vectors.id_array_.swap(id_array); } +void +DeSerialization(const ::milvus::grpc::GeneralQuery& general_query, query::BooleanQueryPtr& boolean_clause, + query::QueryPtr& query_ptr) { + if (general_query.has_boolean_query()) { + boolean_clause->SetOccur((query::Occur)general_query.boolean_query().occur()); + for (uint64_t i = 0; i < general_query.boolean_query().general_query_size(); ++i) { + if (general_query.boolean_query().general_query(i).has_boolean_query()) { + query::BooleanQueryPtr query = std::make_shared(); + DeSerialization(general_query.boolean_query().general_query(i), query, query_ptr); + boolean_clause->AddBooleanQuery(query); + } else { + auto leaf_query = std::make_shared(); + auto query = general_query.boolean_query().general_query(i); + if (query.has_term_query()) { + query::TermQueryPtr term_query = std::make_shared(); + term_query->field_name = query.term_query().field_name(); + term_query->boost = query.term_query().boost(); + size_t int_size = query.term_query().int_value_size(); + size_t double_size = query.term_query().double_value_size(); + if (int_size > 0) { + term_query->field_value.resize(int_size * sizeof(int64_t)); + memcpy(term_query->field_value.data(), query.term_query().int_value().data(), + int_size * sizeof(int64_t)); + } else if (double_size > 0) { + term_query->field_value.resize(double_size * sizeof(double)); + memcpy(term_query->field_value.data(), query.term_query().double_value().data(), + double_size * sizeof(double)); + } + leaf_query->term_query = term_query; + boolean_clause->AddLeafQuery(leaf_query); + } + if (query.has_range_query()) { + query::RangeQueryPtr range_query = std::make_shared(); + range_query->field_name = query.range_query().field_name(); + range_query->boost = query.range_query().boost(); + range_query->compare_expr.resize(query.range_query().operand_size()); + for (uint64_t j = 0; j < query.range_query().operand_size(); ++j) { + range_query->compare_expr[j].compare_operator = + query::CompareOperator(query.range_query().operand(j).operator_()); + range_query->compare_expr[j].operand = query.range_query().operand(j).operand(); + } + leaf_query->range_query = range_query; + boolean_clause->AddLeafQuery(leaf_query); + } + if (query.has_vector_query()) { + query::VectorQueryPtr vector_query = std::make_shared(); + + engine::VectorsData vectors; + CopyRowRecords(query.vector_query().records(), + google::protobuf::RepeatedField(), vectors); + + vector_query->query_vector.float_data = vectors.float_data_; + vector_query->query_vector.binary_data = vectors.binary_data_; + + vector_query->boost = query.vector_query().query_boost(); + vector_query->field_name = query.vector_query().field_name(); + vector_query->topk = query.vector_query().topk(); + + milvus::json json_params; + for (int j = 0; j < query.vector_query().extra_params_size(); j++) { + const ::milvus::grpc::KeyValuePair& extra = query.vector_query().extra_params(j); + if (extra.key() == EXTRA_PARAM_KEY) { + json_params = json::parse(extra.value()); + } + } + vector_query->extra_params = json_params; + + // TODO(yukun): remove hardcode here + std::string vector_placeholder = "placeholder_1"; + query_ptr->vectors.insert(std::make_pair(vector_placeholder, vector_query)); + + leaf_query->vector_placeholder = vector_placeholder; + boolean_clause->AddLeafQuery(leaf_query); + } + } + } + } +} + void ConstructResults(const TopKQueryResult& result, ::milvus::grpc::TopKQueryResult* response) { if (!response) { @@ -1120,76 +1199,324 @@ GrpcRequestHandler::InsertEntity(::grpc::ServerContext* context, const ::milvus: return ::grpc::Status::OK; } -void -DeSerialization(const ::milvus::grpc::GeneralQuery& general_query, query::BooleanQueryPtr& boolean_clause) { - if (general_query.has_boolean_query()) { - boolean_clause->SetOccur((query::Occur)general_query.boolean_query().occur()); - for (uint64_t i = 0; i < general_query.boolean_query().general_query_size(); ++i) { - if (general_query.boolean_query().general_query(i).has_boolean_query()) { - query::BooleanQueryPtr query = std::make_shared(); - DeSerialization(general_query.boolean_query().general_query(i), query); - boolean_clause->AddBooleanQuery(query); +::grpc::Status +GrpcRequestHandler::HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, + ::milvus::grpc::HQueryResult* response) { + CHECK_NULLPTR_RETURN(request); + LOG_SERVER_INFO_ << LogOut("Request [%s] %s begin.", GetContext(context)->RequestID().c_str(), __func__); + + auto boolean_query = std::make_shared(); + auto query_ptr = std::make_shared(); + DeSerialization(request->general_query(), boolean_query, query_ptr); + + auto general_query = std::make_shared(); + query::GenBinaryQuery(boolean_query, general_query->bin); + + Status status; + + if (!query::ValidateBinaryQuery(general_query->bin)) { + status = Status{SERVER_INVALID_BINARY_QUERY, "Generate wrong binary query tree"}; + SET_RESPONSE(response->mutable_status(), status, context); + return ::grpc::Status::OK; + } + + std::vector partition_list; + partition_list.resize(request->partition_tag_array_size()); + for (uint64_t i = 0; i < request->partition_tag_array_size(); ++i) { + partition_list[i] = request->partition_tag_array(i); + } + + milvus::json json_params; + for (int i = 0; i < request->extra_params_size(); i++) { + const ::milvus::grpc::KeyValuePair& extra = request->extra_params(i); + if (extra.key() == EXTRA_PARAM_KEY) { + json_params = json::parse(extra.value()); + } + } + + engine::QueryResult result; + std::vector field_names; + status = request_handler_.HybridSearch(GetContext(context), request->collection_name(), partition_list, + general_query, query_ptr, json_params, field_names, result); + + // step 6: construct and return result + response->set_row_num(result.row_num_); + auto grpc_entity = response->mutable_entity(); + ConstructHEntityResults(result.attrs_, result.vectors_, field_names, grpc_entity); + grpc_entity->mutable_entity_id()->Resize(static_cast(result.result_ids_.size()), 0); + memcpy(grpc_entity->mutable_entity_id()->mutable_data(), result.result_ids_.data(), + result.result_ids_.size() * sizeof(int64_t)); + + response->mutable_distance()->Resize(static_cast(result.result_distances_.size()), 0.0); + memcpy(response->mutable_distance()->mutable_data(), result.result_distances_.data(), + result.result_distances_.size() * sizeof(float)); + + LOG_SERVER_INFO_ << LogOut("Request [%s] %s end.", GetContext(context)->RequestID().c_str(), __func__); + SET_RESPONSE(response->mutable_status(), status, context); + + return ::grpc::Status::OK; +} + +Status +ParseTermQuery(const nlohmann::json& term_json, + std::unordered_map field_type, + query::TermQueryPtr& term_query) { + std::string field_name = term_json["field_name"].get(); + auto term_value_json = term_json["values"]; + if (!term_value_json.is_array()) { + std::string msg = "Term json string is not an array"; + return Status{SERVER_INVALID_DSL_PARAMETER, msg}; + } + + auto term_size = term_value_json.size(); + term_query->field_name = field_name; + term_query->field_value.resize(term_size * sizeof(int64_t)); + + switch (field_type.at(field_name)) { + case engine::meta::hybrid::DataType::INT8: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; i++) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t)); + break; + } + case engine::meta::hybrid::DataType::INT16: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; i++) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t)); + break; + } + case engine::meta::hybrid::DataType::INT32: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; i++) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t)); + break; + } + case engine::meta::hybrid::DataType::INT64: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; ++i) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t)); + break; + } + case engine::meta::hybrid::DataType::FLOAT: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; ++i) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(double)); + break; + } + case engine::meta::hybrid::DataType::DOUBLE: { + std::vector term_value(term_size, 0); + for (uint64_t i = 0; i < term_size; ++i) { + term_value[i] = term_value_json[i].get(); + } + memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(double)); + break; + } + } + return Status::OK(); +} + +Status +ParseRangeQuery(const nlohmann::json& range_json, query::RangeQueryPtr& range_query) { + std::string field_name = range_json["field_name"]; + range_query->field_name = field_name; + + auto range_value_json = range_json["values"]; + if (range_value_json.contains("lt")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::LT; + compare_expr.operand = range_value_json["lt"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + if (range_value_json.contains("lte")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::LTE; + compare_expr.operand = range_value_json["lte"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + if (range_value_json.contains("eq")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::EQ; + compare_expr.operand = range_value_json["eq"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + if (range_value_json.contains("ne")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::NE; + compare_expr.operand = range_value_json["ne"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + if (range_value_json.contains("gt")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::GT; + compare_expr.operand = range_value_json["gt"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + if (range_value_json.contains("gte")) { + query::CompareExpr compare_expr; + compare_expr.compare_operator = query::CompareOperator::GTE; + compare_expr.operand = range_value_json["gte"].get(); + range_query->compare_expr.emplace_back(compare_expr); + } + return Status::OK(); +} + +Status +GrpcRequestHandler::ProcessLeafQueryJson(const nlohmann::json& json, query::BooleanQueryPtr& query) { + auto status = Status::OK(); + if (json.contains("term")) { + auto leaf_query = std::make_shared(); + auto term_json = json["term"]; + auto term_query = std::make_shared(); + status = ParseTermQuery(term_json, field_type_, term_query); + + leaf_query->term_query = term_query; + query->AddLeafQuery(leaf_query); + } else if (json.contains("range")) { + auto leaf_query = std::make_shared(); + auto range_query = std::make_shared(); + auto range_json = json["range"]; + status = ParseRangeQuery(range_json, range_query); + + leaf_query->range_query = range_query; + query->AddLeafQuery(leaf_query); + } else if (json.contains("vector")) { + auto leaf_query = std::make_shared(); + auto vector_json = json["vector"]; + + leaf_query->vector_placeholder = vector_json.get(); + query->AddLeafQuery(leaf_query); + } + return status; +} + +Status +GrpcRequestHandler::ProcessBooleanQueryJson(const nlohmann::json& query_json, query::BooleanQueryPtr& boolean_query) { + auto status = Status::OK(); + if (query_json.contains("must")) { + boolean_query->SetOccur(query::Occur::MUST); + auto must_json = query_json["must"]; + if (!must_json.is_array()) { + std::string msg = "Must json string is not an array"; + return Status{SERVER_INVALID_DSL_PARAMETER, msg}; + } + + for (auto& json : must_json) { + auto must_query = std::make_shared(); + if (json.contains("must") || json.contains("should") || json.contains("must_not")) { + status = ProcessBooleanQueryJson(json, must_query); + if (!status.ok()) { + return status; + } + boolean_query->AddBooleanQuery(must_query); } else { - auto leaf_query = std::make_shared(); - auto query = general_query.boolean_query().general_query(i); - if (query.has_term_query()) { - query::TermQueryPtr term_query = std::make_shared(); - term_query->field_name = query.term_query().field_name(); - term_query->boost = query.term_query().boost(); - size_t int_size = query.term_query().int_value_size(); - size_t double_size = query.term_query().double_value_size(); - if (int_size > 0) { - term_query->field_value.resize(int_size * sizeof(int64_t)); - memcpy(term_query->field_value.data(), query.term_query().int_value().data(), - int_size * sizeof(int64_t)); - } else if (double_size > 0) { - term_query->field_value.resize(double_size * sizeof(double)); - memcpy(term_query->field_value.data(), query.term_query().double_value().data(), - double_size * sizeof(double)); - } - leaf_query->term_query = term_query; - boolean_clause->AddLeafQuery(leaf_query); + status = ProcessLeafQueryJson(json, boolean_query); + if (!status.ok()) { + return status; } - if (query.has_range_query()) { - query::RangeQueryPtr range_query = std::make_shared(); - range_query->field_name = query.range_query().field_name(); - range_query->boost = query.range_query().boost(); - range_query->compare_expr.resize(query.range_query().operand_size()); - for (uint64_t j = 0; j < query.range_query().operand_size(); ++j) { - range_query->compare_expr[j].compare_operator = - query::CompareOperator(query.range_query().operand(j).operator_()); - range_query->compare_expr[j].operand = query.range_query().operand(j).operand(); - } - leaf_query->range_query = range_query; - boolean_clause->AddLeafQuery(leaf_query); + } + } + } else if (query_json.contains("should")) { + boolean_query->SetOccur(query::Occur::SHOULD); + auto should_json = query_json["should"]; + if (!should_json.is_array()) { + std::string msg = "Should json string is not an array"; + return Status{SERVER_INVALID_DSL_PARAMETER, msg}; + } + + for (auto& json : should_json) { + auto should_query = std::make_shared(); + if (json.contains("must") || json.contains("should") || json.contains("must_not")) { + status = ProcessBooleanQueryJson(json, should_query); + if (!status.ok()) { + return status; } - if (query.has_vector_query()) { - query::VectorQueryPtr vector_query = std::make_shared(); + boolean_query->AddBooleanQuery(should_query); + } else { + status = ProcessLeafQueryJson(json, boolean_query); + if (!status.ok()) { + return status; + } + } + } + } else if (query_json.contains("must_not")) { + boolean_query->SetOccur(query::Occur::MUST_NOT); + auto should_json = query_json["must_not"]; + if (!should_json.is_array()) { + std::string msg = "Must_not json string is not an array"; + return Status{SERVER_INVALID_DSL_PARAMETER, msg}; + } - engine::VectorsData vectors; - CopyRowRecords(query.vector_query().records(), - google::protobuf::RepeatedField(), vectors); + for (auto& json : should_json) { + if (json.contains("must") || json.contains("should") || json.contains("must_not")) { + auto must_not_query = std::make_shared(); + status = ProcessBooleanQueryJson(json, must_not_query); + if (!status.ok()) { + return status; + } + boolean_query->AddBooleanQuery(must_not_query); + } else { + status = ProcessLeafQueryJson(json, boolean_query); + if (!status.ok()) { + return status; + } + } + } + } else { + std::string msg = "Must json string doesnot include right query"; + return Status{SERVER_INVALID_DSL_PARAMETER, msg}; + } - vector_query->query_vector.float_data = vectors.float_data_; - vector_query->query_vector.binary_data = vectors.binary_data_; + return status; +} - vector_query->boost = query.vector_query().query_boost(); - vector_query->field_name = query.vector_query().field_name(); - vector_query->topk = query.vector_query().topk(); +Status +GrpcRequestHandler::DeserializeJsonToBoolQuery( + const google::protobuf::RepeatedPtrField<::milvus::grpc::VectorParam>& vector_params, const std::string& dsl_string, + query::BooleanQueryPtr& boolean_query, std::unordered_map& vectors) { + nlohmann::json dsl_json = json::parse(dsl_string); + + try { + auto status = Status::OK(); + for (size_t i = 0; i < vector_params.size(); i++) { + std::string vector_string = vector_params.at(i).json(); + nlohmann::json vector_json = json::parse(vector_string); + json::iterator it = vector_json.begin(); + std::string placeholder = it.key(); + + auto vector_query = std::make_shared(); + vector_query->topk = it.value()["topk"].get(); + vector_query->field_name = it.value()["field_name"].get(); + vector_query->extra_params = it.value()["params"]; + + engine::VectorsData vector_data; + CopyRowRecords(vector_params.at(i).row_record(), google::protobuf::RepeatedField(), + vector_data); + vector_query->query_vector.binary_data = vector_data.binary_data_; + vector_query->query_vector.float_data = vector_data.float_data_; + + vectors.insert(std::make_pair(placeholder, vector_query)); + } - milvus::json json_params; - for (int j = 0; j < query.vector_query().extra_params_size(); j++) { - const ::milvus::grpc::KeyValuePair& extra = query.vector_query().extra_params(j); - if (extra.key() == EXTRA_PARAM_KEY) { - json_params = json::parse(extra.value()); - } - } - vector_query->extra_params = json_params; - leaf_query->vector_query = vector_query; - boolean_clause->AddLeafQuery(leaf_query); - } + if (dsl_json.contains("bool")) { + auto boolean_query_json = dsl_json["bool"]; + status = ProcessBooleanQueryJson(boolean_query_json, boolean_query); + if (!status.ok()) { + return status; } } + return status; + } catch (std::exception& e) { + return Status{SERVER_INVALID_DSL_PARAMETER, e.what()}; } } @@ -1199,15 +1526,21 @@ GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus: CHECK_NULLPTR_RETURN(request); LOG_SERVER_INFO_ << LogOut("Request [%s] %s begin.", GetContext(context)->RequestID().c_str(), __func__); - context::HybridSearchContextPtr hybrid_search_context = std::make_shared(); + Status status; + + status = request_handler_.DescribeHybridCollection(GetContext(context), request->collection_name(), field_type_); query::BooleanQueryPtr boolean_query = std::make_shared(); - DeSerialization(request->general_query(), boolean_query); + query::QueryPtr query_ptr = std::make_shared(); + std::unordered_map vectors; + + DeserializeJsonToBoolQuery(request->vector_param(), request->dsl(), boolean_query, vectors); + + query_ptr->vectors = vectors; query::GeneralQueryPtr general_query = std::make_shared(); query::GenBinaryQuery(boolean_query, general_query->bin); - - Status status; + query_ptr->root = general_query->bin; if (!query::ValidateBinaryQuery(general_query->bin)) { status = Status{SERVER_INVALID_BINARY_QUERY, "Generate wrong binary query tree"}; @@ -1215,8 +1548,6 @@ GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus: return ::grpc::Status::OK; } - hybrid_search_context->general_query_ = general_query; - std::vector partition_list; partition_list.resize(request->partition_tag_array_size()); for (uint64_t i = 0; i < request->partition_tag_array_size(); ++i) { @@ -1233,8 +1564,8 @@ GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus: engine::QueryResult result; std::vector field_names; - status = request_handler_.HybridSearch(GetContext(context), hybrid_search_context, request->collection_name(), - partition_list, general_query, json_params, field_names, result); + status = request_handler_.HybridSearch(GetContext(context), request->collection_name(), partition_list, + general_query, query_ptr, json_params, field_names, result); // step 6: construct and return result response->set_row_num(result.row_num_); diff --git a/core/src/server/grpc_impl/GrpcRequestHandler.h b/core/src/server/grpc_impl/GrpcRequestHandler.h index 3dd6884e..7ae63354 100644 --- a/core/src/server/grpc_impl/GrpcRequestHandler.h +++ b/core/src/server/grpc_impl/GrpcRequestHandler.h @@ -360,6 +360,10 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service, InsertEntity(::grpc::ServerContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response) override; + ::grpc::Status + HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, + ::milvus::grpc::HQueryResult* response) override; + ::grpc::Status HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response) override; @@ -391,12 +395,24 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service, request_handler_ = handler; } + Status + DeserializeJsonToBoolQuery(const google::protobuf::RepeatedPtrField<::milvus::grpc::VectorParam>& vector_params, + const std::string& dsl_string, query::BooleanQueryPtr& boolean_query, + std::unordered_map& query_ptr); + + Status + ProcessBooleanQueryJson(const nlohmann::json& query_json, query::BooleanQueryPtr& boolean_query); + + Status + ProcessLeafQueryJson(const nlohmann::json& json, query::BooleanQueryPtr& query); + private: RequestHandler request_handler_; // std::unordered_map<::grpc::ServerContext*, std::shared_ptr> context_map_; std::unordered_map> context_map_; std::shared_ptr tracer_; + std::unordered_map field_type_; // std::unordered_map<::grpc::ServerContext*, std::unique_ptr> span_map_; mutable std::mt19937_64 random_num_generator_; diff --git a/core/src/server/web_impl/handler/WebRequestHandler.cpp b/core/src/server/web_impl/handler/WebRequestHandler.cpp index 5cdb4a75..672549db 100644 --- a/core/src/server/web_impl/handler/WebRequestHandler.cpp +++ b/core/src/server/web_impl/handler/WebRequestHandler.cpp @@ -611,7 +611,10 @@ WebRequestHandler::ProcessLeafQueryJson(const nlohmann::json& json, milvus::quer vector_query->topk = vector_json["topk"].get(); vector_query->extra_params = vector_json["extra_params"]; - leaf_query->vector_query = vector_query; + // TODO(yukun): remove hardcode here + std::string vector_placeholder = "placeholder_1"; + query_ptr_->vectors.insert(std::make_pair(vector_placeholder, vector_query)); + leaf_query->vector_placeholder = vector_placeholder; query->AddLeafQuery(leaf_query); } return Status::OK(); @@ -814,20 +817,22 @@ WebRequestHandler::HybridSearch(const std::string& collection_name, const nlohma if (query_json.contains("bool")) { auto boolean_query_json = query_json["bool"]; - query::BooleanQueryPtr boolean_query = std::make_shared(); + auto boolean_query = std::make_shared(); + query_ptr_ = std::make_shared(); status = ProcessBoolQueryJson(boolean_query_json, boolean_query); if (!status.ok()) { return status; } - query::GeneralQueryPtr general_query = std::make_shared(); + auto general_query = std::make_shared(); query::GenBinaryQuery(boolean_query, general_query->bin); - context::HybridSearchContextPtr hybrid_search_context = std::make_shared(); + query_ptr_->root = general_query->bin; + engine::QueryResult result; std::vector field_names; - status = request_handler_.HybridSearch(context_ptr_, hybrid_search_context, collection_name, partition_tags, - general_query, extra_params, field_names, result); + status = request_handler_.HybridSearch(context_ptr_, collection_name, partition_tags, general_query, query_ptr_, + extra_params, field_names, result); if (!status.ok()) { return status; diff --git a/core/src/server/web_impl/handler/WebRequestHandler.h b/core/src/server/web_impl/handler/WebRequestHandler.h index 28085096..b7c51f34 100644 --- a/core/src/server/web_impl/handler/WebRequestHandler.h +++ b/core/src/server/web_impl/handler/WebRequestHandler.h @@ -250,6 +250,7 @@ class WebRequestHandler { private: std::shared_ptr context_ptr_; RequestHandler request_handler_; + query::QueryPtr query_ptr_; std::unordered_map field_type_; }; diff --git a/core/src/utils/Error.h b/core/src/utils/Error.h index d24ff8b3..50625121 100644 --- a/core/src/utils/Error.h +++ b/core/src/utils/Error.h @@ -84,6 +84,7 @@ constexpr ErrorCode SERVER_INVALID_INDEX_FILE_SIZE = ToServerErrorCode(116); constexpr ErrorCode SERVER_OUT_OF_MEMORY = ToServerErrorCode(117); constexpr ErrorCode SERVER_INVALID_PARTITION_TAG = ToServerErrorCode(118); constexpr ErrorCode SERVER_INVALID_BINARY_QUERY = ToServerErrorCode(119); +constexpr ErrorCode SERVER_INVALID_DSL_PARAMETER = ToServerErrorCode(120); // db error code constexpr ErrorCode DB_META_TRANSACTION_FAILED = ToDbErrorCode(1); diff --git a/core/unittest/db/test_hybrid_db.cpp b/core/unittest/db/test_hybrid_db.cpp index f38bf107..4c7fa1d7 100644 --- a/core/unittest/db/test_hybrid_db.cpp +++ b/core/unittest/db/test_hybrid_db.cpp @@ -116,7 +116,7 @@ BuildEntity(uint64_t n, uint64_t batch_index, milvus::engine::Entity& entity) { } void -ConstructGeneralQuery(milvus::query::GeneralQueryPtr& general_query) { +ConstructGeneralQuery(milvus::query::GeneralQueryPtr& general_query, milvus::query::QueryPtr& query_ptr) { general_query->bin->relation = milvus::query::QueryRelation::AND; general_query->bin->left_query = std::make_shared(); general_query->bin->right_query = std::make_shared(); @@ -167,7 +167,12 @@ ConstructGeneralQuery(milvus::query::GeneralQueryPtr& general_query) { left->bin->right_query->leaf->range_query = range_query; right->leaf = std::make_shared(); - right->leaf->vector_query = vector_query; + + std::string vector_placeholder = "placeholder_1"; + + right->leaf->vector_placeholder = vector_placeholder; + query_ptr->root = general_query->bin; + query_ptr->vectors.insert(std::make_pair(vector_placeholder, vector_query)); } } // namespace @@ -234,14 +239,14 @@ TEST_F(DBTest, HYBRID_SEARCH_TEST) { ASSERT_TRUE(stat.ok()); // Construct general query - milvus::query::GeneralQueryPtr general_query = std::make_shared(); - ConstructGeneralQuery(general_query); + auto general_query = std::make_shared(); + auto query_ptr = std::make_shared(); + ConstructGeneralQuery(general_query, query_ptr); std::vector tags; - milvus::context::HybridSearchContextPtr hybrid_context = std::make_shared(); milvus::engine::QueryResult result; - stat = db_->HybridQuery(dummy_context_, COLLECTION_NAME, tags, hybrid_context, general_query, field_names, - attr_type, result); + stat = db_->HybridQuery(dummy_context_, COLLECTION_NAME, tags, general_query, query_ptr, field_names, attr_type, + result); ASSERT_TRUE(stat.ok()); ASSERT_EQ(result.row_num_, NQ); ASSERT_EQ(result.result_ids_.size(), NQ * TOPK); diff --git a/core/unittest/server/test_rpc.cpp b/core/unittest/server/test_rpc.cpp index 1f145a47..fa46b0d4 100644 --- a/core/unittest/server/test_rpc.cpp +++ b/core/unittest/server/test_rpc.cpp @@ -1026,7 +1026,7 @@ TEST_F(RpcHandlerTest, HYBRID_TEST) { uint64_t nq = 10; uint64_t topk = 10; - milvus::grpc::HSearchParam search_param; + milvus::grpc::HSearchParamPB search_param; auto general_query = search_param.mutable_general_query(); auto boolean_query_1 = general_query->mutable_boolean_query(); boolean_query_1->set_occur(milvus::grpc::Occur::MUST); @@ -1069,7 +1069,46 @@ TEST_F(RpcHandlerTest, HYBRID_TEST) { search_extra_param->set_value(""); milvus::grpc::HQueryResult topk_query_result; - handler->HybridSearch(&context, &search_param, &topk_query_result); + handler->HybridSearchPB(&context, &search_param, &topk_query_result); + + // Test new HybridSearch + milvus::grpc::HSearchParam new_search_param; + new_search_param.set_collection_name("test_hybrid"); + + nlohmann::json dsl_json, bool_json, term_json, range_json, vector_json; + term_json["term"]["field_name"] = "field_0"; + term_json["term"]["values"] = term_value; + bool_json["must"].push_back(term_json); + + range_json["range"]["field_name"] = "field_0"; + nlohmann::json comp_json; + comp_json["gte"] = "0"; + comp_json["lte"] = "100000"; + range_json["range"]["values"] = comp_json; + bool_json["must"].push_back(range_json); + + std::string placeholder = "placeholder_1"; + vector_json["vector"] = placeholder; + bool_json["must"].push_back(vector_json); + + dsl_json["bool"] = bool_json; + + nlohmann::json vector_param_json, vector_extra_params; + vector_param_json[placeholder]["field_name"] = "field_1"; + vector_param_json[placeholder]["topk"] = topk; + vector_extra_params["nprobe"] = 64; + vector_param_json[placeholder]["params"] = vector_extra_params; + + new_search_param.set_dsl(dsl_json.dump()); + auto vector_param = new_search_param.add_vector_param(); + for (auto record : query_vector) { + auto row_record = vector_param->add_row_record(); + CopyRowRecord(row_record, record); + } + vector_param->set_json(vector_param_json.dump()); + + milvus::grpc::HQueryResult new_query_result; + handler->HybridSearch(&context, &new_search_param, &new_query_result); } ////////////////////////////////////////////////////////////////////// diff --git a/sdk/examples/hybrid/src/ClientTest.cpp b/sdk/examples/hybrid/src/ClientTest.cpp index 17b9c11a..23068d9e 100644 --- a/sdk/examples/hybrid/src/ClientTest.cpp +++ b/sdk/examples/hybrid/src/ClientTest.cpp @@ -18,15 +18,15 @@ #include #include #include +#include #include #include -#include namespace { const char* COLLECTION_NAME = milvus_sdk::Utils::GenCollectionName().c_str(); -constexpr int64_t COLLECTION_DIMENSION = 512; +constexpr int64_t COLLECTION_DIMENSION = 128; constexpr int64_t COLLECTION_INDEX_FILE_SIZE = 1024; constexpr milvus::MetricType COLLECTION_METRIC_TYPE = milvus::MetricType::L2; constexpr int64_t BATCH_ENTITY_COUNT = 100000; @@ -43,9 +43,8 @@ void PrintHybridQueryResult(const std::vector& id_array, const milvus::HybridQueryResult& result) { for (size_t i = 0; i < id_array.size(); i++) { std::string prefix = "No." + std::to_string(i) + " id:" + std::to_string(id_array[i]); - std::cout<< prefix << "\t["; + std::cout << prefix << "\t["; for (size_t j = 0; j < result.attr_records.size(); i++) { - } } } @@ -127,7 +126,7 @@ ClientTest::InsertHybridEntities(std::string& collection_name, int64_t row_num) } void -ClientTest::HybridSearch(std::string& collection_name) { +ClientTest::HybridSearchPB(std::string& collection_name) { std::vector partition_tags; milvus::TopKHybridQueryResult topk_query_result; @@ -144,27 +143,29 @@ ClientTest::HybridSearch(std::string& collection_name) { std::string extra_params; milvus::Status status = - conn_->HybridSearch(collection_name, partition_tags, query_clause, extra_params, topk_query_result); - - for (uint64_t i = 0; i < topk_query_result.size(); i++) { - for (auto attr : topk_query_result[i].attr_records) { - std::cout << "Field: " << attr.first << std::endl; - if (attr.second.int_record.size() > 0) { - for (auto record : attr.second.int_record) { - std::cout << record << "\t"; - } - } else if (attr.second.double_record.size() > 0) { - for (auto record : attr.second.double_record) { - std::cout << record << "\t"; - } - } - std::cout << std::endl; - } - } + conn_->HybridSearchPB(collection_name, partition_tags, query_clause, extra_params, topk_query_result); - for (uint64_t i = 0; i < topk_query_result.size(); ++i) { - std::cout << topk_query_result[i].ids[1] << " --------- " << topk_query_result[i].distances[1] << std::endl; + milvus_sdk::Utils::PrintTopKHybridQueryResult(topk_query_result); + std::cout << "HybridSearch function call status: " << status.message() << std::endl; +} + +void +ClientTest::HybridSearch(std::string& collection_name) { + nlohmann::json dsl_json, vector_param_json; + milvus_sdk::Utils::GenDSLJson(dsl_json, vector_param_json); + + std::vector entity_array; + std::vector record_ids; + { // generate vectors + milvus_sdk::Utils::ConstructVector(NQ, COLLECTION_DIMENSION, entity_array); } + + std::vector partition_tags; + milvus::TopKHybridQueryResult topk_query_result; + auto status = conn_->HybridSearch(collection_name, partition_tags, dsl_json.dump(), vector_param_json.dump(), + entity_array, topk_query_result); + + milvus_sdk::Utils::PrintTopKHybridQueryResult(topk_query_result); std::cout << "HybridSearch function call status: " << status.message() << std::endl; } @@ -187,5 +188,6 @@ ClientTest::TestHybrid() { InsertHybridEntities(collection_name, 10000); Flush(collection_name); sleep(2); + // HybridSearchPB(collection_name); HybridSearch(collection_name); } diff --git a/sdk/examples/hybrid/src/ClientTest.h b/sdk/examples/hybrid/src/ClientTest.h index a4f1d610..6cf5e566 100644 --- a/sdk/examples/hybrid/src/ClientTest.h +++ b/sdk/examples/hybrid/src/ClientTest.h @@ -36,6 +36,9 @@ class ClientTest { void InsertHybridEntities(std::string&, int64_t); + void + HybridSearchPB(std::string&); + void HybridSearch(std::string&); diff --git a/sdk/examples/utils/Utils.cpp b/sdk/examples/utils/Utils.cpp index 90afdc77..25ed1197 100644 --- a/sdk/examples/utils/Utils.cpp +++ b/sdk/examples/utils/Utils.cpp @@ -73,31 +73,50 @@ Utils::GenCollectionName() { std::string Utils::MetricTypeName(const milvus::MetricType& metric_type) { switch (metric_type) { - case milvus::MetricType::L2:return "L2 distance"; - case milvus::MetricType::IP:return "Inner product"; - case milvus::MetricType::HAMMING:return "Hamming distance"; - case milvus::MetricType::JACCARD:return "Jaccard distance"; - case milvus::MetricType::TANIMOTO:return "Tanimoto distance"; - case milvus::MetricType::SUBSTRUCTURE:return "Substructure distance"; - case milvus::MetricType::SUPERSTRUCTURE:return "Superstructure distance"; - default:return "Unknown metric type"; + case milvus::MetricType::L2: + return "L2 distance"; + case milvus::MetricType::IP: + return "Inner product"; + case milvus::MetricType::HAMMING: + return "Hamming distance"; + case milvus::MetricType::JACCARD: + return "Jaccard distance"; + case milvus::MetricType::TANIMOTO: + return "Tanimoto distance"; + case milvus::MetricType::SUBSTRUCTURE: + return "Substructure distance"; + case milvus::MetricType::SUPERSTRUCTURE: + return "Superstructure distance"; + default: + return "Unknown metric type"; } } std::string Utils::IndexTypeName(const milvus::IndexType& index_type) { switch (index_type) { - case milvus::IndexType::FLAT:return "FLAT"; - case milvus::IndexType::IVFFLAT:return "IVFFLAT"; - case milvus::IndexType::IVFSQ8:return "IVFSQ8"; - case milvus::IndexType::RNSG:return "NSG"; - case milvus::IndexType::IVFSQ8H:return "IVFSQ8H"; - case milvus::IndexType::IVFPQ:return "IVFPQ"; - case milvus::IndexType::SPTAGKDT:return "SPTAGKDT"; - case milvus::IndexType::SPTAGBKT:return "SPTAGBKT"; - case milvus::IndexType::HNSW:return "HNSW"; - case milvus::IndexType::ANNOY:return "ANNOY"; - default:return "Unknown index type"; + case milvus::IndexType::FLAT: + return "FLAT"; + case milvus::IndexType::IVFFLAT: + return "IVFFLAT"; + case milvus::IndexType::IVFSQ8: + return "IVFSQ8"; + case milvus::IndexType::RNSG: + return "NSG"; + case milvus::IndexType::IVFSQ8H: + return "IVFSQ8H"; + case milvus::IndexType::IVFPQ: + return "IVFPQ"; + case milvus::IndexType::SPTAGKDT: + return "SPTAGKDT"; + case milvus::IndexType::SPTAGBKT: + return "SPTAGBKT"; + case milvus::IndexType::HNSW: + return "HNSW"; + case milvus::IndexType::ANNOY: + return "ANNOY"; + default: + return "Unknown index type"; } } @@ -217,13 +236,8 @@ Utils::DoSearch(std::shared_ptr conn, const std::string& col BLOCK_SPLITER JSON json_params = {{"nprobe", nprobe}}; milvus_sdk::TimeRecorder rc("Search"); - milvus::Status stat = - conn->Search(collection_name, - partition_tags, - temp_entity_array, - top_k, - json_params.dump(), - topk_query_result); + milvus::Status stat = conn->Search(collection_name, partition_tags, temp_entity_array, top_k, + json_params.dump(), topk_query_result); std::cout << "Search function call status: " << stat.message() << std::endl; BLOCK_SPLITER } @@ -232,7 +246,8 @@ Utils::DoSearch(std::shared_ptr conn, const std::string& col CheckSearchResult(entity_array, topk_query_result); } -void ConstructVector(uint64_t nq, uint64_t dimension, std::vector& query_vector) { +void +Utils::ConstructVector(uint64_t nq, uint64_t dimension, std::vector& query_vector) { query_vector.resize(nq); std::default_random_engine e; std::uniform_real_distribution u(0, 1); @@ -246,7 +261,7 @@ void ConstructVector(uint64_t nq, uint64_t dimension, std::vector Utils::GenLeafQuery() { - //Construct TermQuery + // Construct TermQuery uint64_t row_num = 10000; std::vector field_value; field_value.resize(row_num); @@ -257,14 +272,14 @@ Utils::GenLeafQuery() { tq->field_name = "field_1"; tq->int_value = field_value; - //Construct RangeQuery + // Construct RangeQuery milvus::CompareExpr ce1 = {milvus::CompareOperator::LTE, "100000"}, ce2 = {milvus::CompareOperator::GTE, "1"}; std::vector ces{ce1, ce2}; milvus::RangeQueryPtr rq = std::make_shared(); rq->field_name = "field_2"; rq->compare_expr = ces; - //Construct VectorQuery + // Construct VectorQuery uint64_t NQ = 10; uint64_t DIMENSION = 128; uint64_t NPROBE = 32; @@ -275,7 +290,6 @@ Utils::GenLeafQuery() { JSON json_params = {{"nprobe", NPROBE}}; vq->extra_params = json_params.dump(); - std::vector lq; milvus::LeafQueryPtr lq1 = std::make_shared(); milvus::LeafQueryPtr lq2 = std::make_shared(); @@ -293,4 +307,62 @@ Utils::GenLeafQuery() { return lq; } +void +Utils::GenDSLJson(nlohmann::json& dsl_json, nlohmann::json& vector_param_json) { + uint64_t row_num = 10000; + std::vector term_value; + term_value.resize(row_num); + for (uint64_t i = 0; i < row_num; ++i) { + term_value[i] = i; + } + + nlohmann::json bool_json, term_json, range_json, vector_json; + term_json["term"]["field_name"] = "field_1"; + term_json["term"]["values"] = term_value; + bool_json["must"].push_back(term_json); + + range_json["range"]["field_name"] = "field_1"; + nlohmann::json comp_json; + comp_json["gte"] = "0"; + comp_json["lte"] = "100000"; + range_json["range"]["values"] = comp_json; + bool_json["must"].push_back(range_json); + + std::string placeholder = "placeholder_1"; + vector_json["vector"] = placeholder; + bool_json["must"].push_back(vector_json); + + dsl_json["bool"] = bool_json; + + nlohmann::json vector_extra_params; + int64_t topk = 10; + vector_param_json[placeholder]["field_name"] = "field_3"; + vector_param_json[placeholder]["topk"] = topk; + vector_extra_params["nprobe"] = 64; + vector_param_json[placeholder]["params"] = vector_extra_params; +} + +void +Utils::PrintTopKHybridQueryResult(milvus::TopKHybridQueryResult& topk_query_result) { + for (uint64_t i = 0; i < topk_query_result.size(); i++) { + for (auto attr : topk_query_result[i].attr_records) { + std::cout << "Field: " << attr.first << std::endl; + if (attr.second.int_record.size() > 0) { + for (auto record : attr.second.int_record) { + std::cout << record << "\t"; + } + } else if (attr.second.double_record.size() > 0) { + for (auto record : attr.second.double_record) { + std::cout << record << "\t"; + } + } + std::cout << std::endl; + } + } + + for (uint64_t i = 0; i < topk_query_result.size(); ++i) { + std::cout << topk_query_result[i].ids[1] << " --------- " << topk_query_result[i].distances[1] << std::endl; + } +} + } // namespace milvus_sdk diff --git a/sdk/examples/utils/Utils.h b/sdk/examples/utils/Utils.h index a70e97a9..e0c0cb78 100644 --- a/sdk/examples/utils/Utils.h +++ b/sdk/examples/utils/Utils.h @@ -11,8 +11,8 @@ #pragma once -#include "MilvusApi.h" #include "BooleanQuery.h" +#include "MilvusApi.h" #include "thirdparty/nlohmann/json.hpp" #include @@ -54,8 +54,8 @@ class Utils { PrintIndexParam(const milvus::IndexParam& index_param); static void - BuildEntities(int64_t from, int64_t to, std::vector& entity_array, - std::vector& entity_ids, int64_t dimension); + BuildEntities(int64_t from, int64_t to, std::vector& entity_array, std::vector& entity_ids, + int64_t dimension); static void PrintSearchResult(const std::vector>& entity_array, @@ -71,8 +71,17 @@ class Utils { const std::vector>& entity_array, milvus::TopKQueryResult& topk_query_result); + static void + ConstructVector(uint64_t nq, uint64_t dimension, std::vector& query_vector); + static std::vector GenLeafQuery(); + + static void + GenDSLJson(nlohmann::json& dsl_json, nlohmann::json& vector_param_json); + + static void + PrintTopKHybridQueryResult(milvus::TopKHybridQueryResult& topk_query_result); }; } // namespace milvus_sdk diff --git a/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.cc b/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.cc index 9dde7b29..52f2e8a5 100644 --- a/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.cc +++ b/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.cc @@ -54,6 +54,7 @@ static const char* MilvusService_method_names[] = { "/milvus.grpc.MilvusService/ShowHybridCollectionInfo", "/milvus.grpc.MilvusService/PreloadHybridCollection", "/milvus.grpc.MilvusService/InsertEntity", + "/milvus.grpc.MilvusService/HybridSearchPB", "/milvus.grpc.MilvusService/HybridSearch", "/milvus.grpc.MilvusService/HybridSearchInSegments", "/milvus.grpc.MilvusService/GetEntityByID", @@ -102,11 +103,12 @@ MilvusService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& chan , rpcmethod_ShowHybridCollectionInfo_(MilvusService_method_names[31], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_PreloadHybridCollection_(MilvusService_method_names[32], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_InsertEntity_(MilvusService_method_names[33], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HybridSearch_(MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_HybridSearchInSegments_(MilvusService_method_names[35], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_GetEntityByID_(MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_GetEntityIDs_(MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_DeleteEntitiesByID_(MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearchPB_(MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearch_(MilvusService_method_names[35], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HybridSearchInSegments_(MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetEntityByID_(MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetEntityIDs_(MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_DeleteEntitiesByID_(MilvusService_method_names[39], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status MilvusService::Stub::CreateCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionSchema& request, ::milvus::grpc::Status* response) { @@ -1061,6 +1063,34 @@ void MilvusService::Stub::experimental_async::InsertEntity(::grpc::ClientContext return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HEntityIDs>::Create(channel_.get(), cq, rpcmethod_InsertEntity_, context, request, false); } +::grpc::Status MilvusService::Stub::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HybridSearchPB_, context, request, response); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, std::move(f)); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, reactor); +} + +void MilvusService::Stub::experimental_async::HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_HybridSearchPB_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* MilvusService::Stub::AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HQueryResult>::Create(channel_.get(), cq, rpcmethod_HybridSearchPB_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* MilvusService::Stub::PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::HQueryResult>::Create(channel_.get(), cq, rpcmethod_HybridSearchPB_, context, request, false); +} + ::grpc::Status MilvusService::Stub::HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) { return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_HybridSearch_, context, request, response); } @@ -1375,25 +1405,30 @@ MilvusService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( MilvusService_method_names[34], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>( + std::mem_fn(&MilvusService::Service::HybridSearchPB), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + MilvusService_method_names[35], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>( std::mem_fn(&MilvusService::Service::HybridSearch), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[35], + MilvusService_method_names[36], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>( std::mem_fn(&MilvusService::Service::HybridSearchInSegments), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[36], + MilvusService_method_names[37], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>( std::mem_fn(&MilvusService::Service::GetEntityByID), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[37], + MilvusService_method_names[38], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>( std::mem_fn(&MilvusService::Service::GetEntityIDs), this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - MilvusService_method_names[38], + MilvusService_method_names[39], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>( std::mem_fn(&MilvusService::Service::DeleteEntitiesByID), this))); @@ -1640,6 +1675,13 @@ MilvusService::Service::~Service() { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status MilvusService::Service::HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + ::grpc::Status MilvusService::Service::HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response) { (void) context; (void) request; diff --git a/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.h b/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.h index c90fa1ba..0cb5cf4a 100644 --- a/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.h +++ b/sdk/grpc-gen/gen-milvus/milvus.grpc.pb.h @@ -447,6 +447,13 @@ class MilvusService final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>> PrepareAsyncInsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>>(PrepareAsyncInsertEntityRaw(context, request, cq)); } + virtual ::grpc::Status HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> AsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchPBRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> PrepareAsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(PrepareAsyncHybridSearchPBRaw(context, request, cq)); + } virtual ::grpc::Status HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>> AsyncHybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchRaw(context, request, cq)); @@ -783,6 +790,10 @@ class MilvusService final { virtual void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, std::function) = 0; virtual void InsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; virtual void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) = 0; virtual void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; @@ -874,6 +885,8 @@ class MilvusService final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncPreloadHybridCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>* AsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HEntityIDs>* PrepareAsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* AsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncHybridSearchInSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchInSegmentsParam& request, ::grpc::CompletionQueue* cq) = 0; @@ -1126,6 +1139,13 @@ class MilvusService final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>> PrepareAsyncInsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>>(PrepareAsyncInsertEntityRaw(context, request, cq)); } + ::grpc::Status HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::milvus::grpc::HQueryResult* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> AsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchPBRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> PrepareAsyncHybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(PrepareAsyncHybridSearchPBRaw(context, request, cq)); + } ::grpc::Status HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::milvus::grpc::HQueryResult* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>> AsyncHybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>>(AsyncHybridSearchRaw(context, request, cq)); @@ -1300,6 +1320,10 @@ class MilvusService final { void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, std::function) override; void InsertEntity(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void InsertEntity(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HEntityIDs* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, std::function) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, std::function) override; void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function) override; void HybridSearch(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; @@ -1399,6 +1423,8 @@ class MilvusService final { ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncPreloadHybridCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>* AsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HEntityIDs>* PrepareAsyncInsertEntityRaw(::grpc::ClientContext* context, const ::milvus::grpc::HInsertParam& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* AsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchPBRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParamPB& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* AsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::HQueryResult>* PrepareAsyncHybridSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchParam& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* AsyncHybridSearchInSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::HSearchInSegmentsParam& request, ::grpc::CompletionQueue* cq) override; @@ -1443,6 +1469,7 @@ class MilvusService final { const ::grpc::internal::RpcMethod rpcmethod_ShowHybridCollectionInfo_; const ::grpc::internal::RpcMethod rpcmethod_PreloadHybridCollection_; const ::grpc::internal::RpcMethod rpcmethod_InsertEntity_; + const ::grpc::internal::RpcMethod rpcmethod_HybridSearchPB_; const ::grpc::internal::RpcMethod rpcmethod_HybridSearch_; const ::grpc::internal::RpcMethod rpcmethod_HybridSearchInSegments_; const ::grpc::internal::RpcMethod rpcmethod_GetEntityByID_; @@ -1651,6 +1678,7 @@ class MilvusService final { // ///////////////////////////////////////////////////////////////// // virtual ::grpc::Status InsertEntity(::grpc::ServerContext* context, const ::milvus::grpc::HInsertParam* request, ::milvus::grpc::HEntityIDs* response); + virtual ::grpc::Status HybridSearchPB(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParamPB* request, ::milvus::grpc::HQueryResult* response); virtual ::grpc::Status HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, ::milvus::grpc::HQueryResult* response); virtual ::grpc::Status HybridSearchInSegments(::grpc::ServerContext* context, const ::milvus::grpc::HSearchInSegmentsParam* request, ::milvus::grpc::TopKQueryResult* response); virtual ::grpc::Status GetEntityByID(::grpc::ServerContext* context, const ::milvus::grpc::VectorsIdentity* request, ::milvus::grpc::HEntity* response); @@ -2338,12 +2366,32 @@ class MilvusService final { } }; template + class WithAsyncMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodAsync(34); + } + ~WithAsyncMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHybridSearchPB(::grpc::ServerContext* context, ::milvus::grpc::HSearchParamPB* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_HybridSearch() { - ::grpc::Service::MarkMethodAsync(34); + ::grpc::Service::MarkMethodAsync(35); } ~WithAsyncMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -2354,7 +2402,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearch(::grpc::ServerContext* context, ::milvus::grpc::HSearchParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2363,7 +2411,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodAsync(35); + ::grpc::Service::MarkMethodAsync(36); } ~WithAsyncMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -2374,7 +2422,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearchInSegments(::grpc::ServerContext* context, ::milvus::grpc::HSearchInSegmentsParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2383,7 +2431,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_GetEntityByID() { - ::grpc::Service::MarkMethodAsync(36); + ::grpc::Service::MarkMethodAsync(37); } ~WithAsyncMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -2394,7 +2442,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityByID(::grpc::ServerContext* context, ::milvus::grpc::VectorsIdentity* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HEntity>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2403,7 +2451,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodAsync(37); + ::grpc::Service::MarkMethodAsync(38); } ~WithAsyncMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -2414,7 +2462,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityIDs(::grpc::ServerContext* context, ::milvus::grpc::HGetEntityIDsParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::HEntityIDs>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2423,7 +2471,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodAsync(38); + ::grpc::Service::MarkMethodAsync(39); } ~WithAsyncMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -2434,10 +2482,10 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestDeleteEntitiesByID(::grpc::ServerContext* context, ::milvus::grpc::HDeleteByIDParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(39, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; + typedef WithAsyncMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; template class ExperimentalWithCallbackMethod_CreateCollection : public BaseClass { private: @@ -3493,12 +3541,43 @@ class MilvusService final { virtual void InsertEntity(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HInsertParam* /*request*/, ::milvus::grpc::HEntityIDs* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template + class ExperimentalWithCallbackMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithCallbackMethod_HybridSearchPB() { + ::grpc::Service::experimental().MarkMethodCallback(34, + new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>( + [this](::grpc::ServerContext* context, + const ::milvus::grpc::HSearchParamPB* request, + ::milvus::grpc::HQueryResult* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->HybridSearchPB(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_HybridSearchPB( + ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>*>( + ::grpc::Service::experimental().GetHandler(34)) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template class ExperimentalWithCallbackMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_HybridSearch() { - ::grpc::Service::experimental().MarkMethodCallback(34, + ::grpc::Service::experimental().MarkMethodCallback(35, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request, @@ -3510,7 +3589,7 @@ class MilvusService final { void SetMessageAllocatorFor_HybridSearch( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>*>( - ::grpc::Service::experimental().GetHandler(34)) + ::grpc::Service::experimental().GetHandler(35)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_HybridSearch() override { @@ -3529,7 +3608,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_HybridSearchInSegments() { - ::grpc::Service::experimental().MarkMethodCallback(35, + ::grpc::Service::experimental().MarkMethodCallback(36, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HSearchInSegmentsParam* request, @@ -3541,7 +3620,7 @@ class MilvusService final { void SetMessageAllocatorFor_HybridSearchInSegments( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>*>( - ::grpc::Service::experimental().GetHandler(35)) + ::grpc::Service::experimental().GetHandler(36)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_HybridSearchInSegments() override { @@ -3560,7 +3639,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_GetEntityByID() { - ::grpc::Service::experimental().MarkMethodCallback(36, + ::grpc::Service::experimental().MarkMethodCallback(37, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>( [this](::grpc::ServerContext* context, const ::milvus::grpc::VectorsIdentity* request, @@ -3572,7 +3651,7 @@ class MilvusService final { void SetMessageAllocatorFor_GetEntityByID( ::grpc::experimental::MessageAllocator< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>*>( - ::grpc::Service::experimental().GetHandler(36)) + ::grpc::Service::experimental().GetHandler(37)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_GetEntityByID() override { @@ -3591,7 +3670,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_GetEntityIDs() { - ::grpc::Service::experimental().MarkMethodCallback(37, + ::grpc::Service::experimental().MarkMethodCallback(38, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HGetEntityIDsParam* request, @@ -3603,7 +3682,7 @@ class MilvusService final { void SetMessageAllocatorFor_GetEntityIDs( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>*>( - ::grpc::Service::experimental().GetHandler(37)) + ::grpc::Service::experimental().GetHandler(38)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_GetEntityIDs() override { @@ -3622,7 +3701,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_DeleteEntitiesByID() { - ::grpc::Service::experimental().MarkMethodCallback(38, + ::grpc::Service::experimental().MarkMethodCallback(39, new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>( [this](::grpc::ServerContext* context, const ::milvus::grpc::HDeleteByIDParam* request, @@ -3634,7 +3713,7 @@ class MilvusService final { void SetMessageAllocatorFor_DeleteEntitiesByID( ::grpc::experimental::MessageAllocator< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>* allocator) { static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>*>( - ::grpc::Service::experimental().GetHandler(38)) + ::grpc::Service::experimental().GetHandler(39)) ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_DeleteEntitiesByID() override { @@ -3647,7 +3726,7 @@ class MilvusService final { } virtual void DeleteEntitiesByID(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HDeleteByIDParam* /*request*/, ::milvus::grpc::Status* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; - typedef ExperimentalWithCallbackMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService; + typedef ExperimentalWithCallbackMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService; template class WithGenericMethod_CreateCollection : public BaseClass { private: @@ -4227,12 +4306,29 @@ class MilvusService final { } }; template + class WithGenericMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodGeneric(34); + } + ~WithGenericMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithGenericMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_HybridSearch() { - ::grpc::Service::MarkMethodGeneric(34); + ::grpc::Service::MarkMethodGeneric(35); } ~WithGenericMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -4249,7 +4345,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodGeneric(35); + ::grpc::Service::MarkMethodGeneric(36); } ~WithGenericMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -4266,7 +4362,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_GetEntityByID() { - ::grpc::Service::MarkMethodGeneric(36); + ::grpc::Service::MarkMethodGeneric(37); } ~WithGenericMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -4283,7 +4379,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodGeneric(37); + ::grpc::Service::MarkMethodGeneric(38); } ~WithGenericMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -4300,7 +4396,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodGeneric(38); + ::grpc::Service::MarkMethodGeneric(39); } ~WithGenericMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -4992,12 +5088,32 @@ class MilvusService final { } }; template + class WithRawMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodRaw(34); + } + ~WithRawMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHybridSearchPB(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_HybridSearch() { - ::grpc::Service::MarkMethodRaw(34); + ::grpc::Service::MarkMethodRaw(35); } ~WithRawMethod_HybridSearch() override { BaseClassMustBeDerivedFromService(this); @@ -5008,7 +5124,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearch(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(34, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5017,7 +5133,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodRaw(35); + ::grpc::Service::MarkMethodRaw(36); } ~WithRawMethod_HybridSearchInSegments() override { BaseClassMustBeDerivedFromService(this); @@ -5028,7 +5144,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestHybridSearchInSegments(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(35, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5037,7 +5153,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_GetEntityByID() { - ::grpc::Service::MarkMethodRaw(36); + ::grpc::Service::MarkMethodRaw(37); } ~WithRawMethod_GetEntityByID() override { BaseClassMustBeDerivedFromService(this); @@ -5048,7 +5164,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityByID(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5057,7 +5173,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodRaw(37); + ::grpc::Service::MarkMethodRaw(38); } ~WithRawMethod_GetEntityIDs() override { BaseClassMustBeDerivedFromService(this); @@ -5068,7 +5184,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestGetEntityIDs(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5077,7 +5193,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodRaw(38); + ::grpc::Service::MarkMethodRaw(39); } ~WithRawMethod_DeleteEntitiesByID() override { BaseClassMustBeDerivedFromService(this); @@ -5088,7 +5204,7 @@ class MilvusService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestDeleteEntitiesByID(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(38, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(39, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -5942,12 +6058,37 @@ class MilvusService final { virtual void InsertEntity(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template + class ExperimentalWithRawCallbackMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + ExperimentalWithRawCallbackMethod_HybridSearchPB() { + ::grpc::Service::experimental().MarkMethodRawCallback(34, + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->HybridSearchPB(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void HybridSearchPB(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template class ExperimentalWithRawCallbackMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_HybridSearch() { - ::grpc::Service::experimental().MarkMethodRawCallback(34, + ::grpc::Service::experimental().MarkMethodRawCallback(35, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -5972,7 +6113,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_HybridSearchInSegments() { - ::grpc::Service::experimental().MarkMethodRawCallback(35, + ::grpc::Service::experimental().MarkMethodRawCallback(36, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -5997,7 +6138,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_GetEntityByID() { - ::grpc::Service::experimental().MarkMethodRawCallback(36, + ::grpc::Service::experimental().MarkMethodRawCallback(37, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6022,7 +6163,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_GetEntityIDs() { - ::grpc::Service::experimental().MarkMethodRawCallback(37, + ::grpc::Service::experimental().MarkMethodRawCallback(38, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6047,7 +6188,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_DeleteEntitiesByID() { - ::grpc::Service::experimental().MarkMethodRawCallback(38, + ::grpc::Service::experimental().MarkMethodRawCallback(39, new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, @@ -6747,12 +6888,32 @@ class MilvusService final { virtual ::grpc::Status StreamedInsertEntity(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HInsertParam,::milvus::grpc::HEntityIDs>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_HybridSearchPB : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HybridSearchPB() { + ::grpc::Service::MarkMethodStreamed(34, + new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchParamPB, ::milvus::grpc::HQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearchPB::StreamedHybridSearchPB, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_HybridSearchPB() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HybridSearchPB(::grpc::ServerContext* /*context*/, const ::milvus::grpc::HSearchParamPB* /*request*/, ::milvus::grpc::HQueryResult* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHybridSearchPB(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HSearchParamPB,::milvus::grpc::HQueryResult>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_HybridSearch : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_HybridSearch() { - ::grpc::Service::MarkMethodStreamed(34, + ::grpc::Service::MarkMethodStreamed(35, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchParam, ::milvus::grpc::HQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearch::StreamedHybridSearch, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_HybridSearch() override { @@ -6772,7 +6933,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_HybridSearchInSegments() { - ::grpc::Service::MarkMethodStreamed(35, + ::grpc::Service::MarkMethodStreamed(36, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HSearchInSegmentsParam, ::milvus::grpc::TopKQueryResult>(std::bind(&WithStreamedUnaryMethod_HybridSearchInSegments::StreamedHybridSearchInSegments, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_HybridSearchInSegments() override { @@ -6792,7 +6953,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_GetEntityByID() { - ::grpc::Service::MarkMethodStreamed(36, + ::grpc::Service::MarkMethodStreamed(37, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::VectorsIdentity, ::milvus::grpc::HEntity>(std::bind(&WithStreamedUnaryMethod_GetEntityByID::StreamedGetEntityByID, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_GetEntityByID() override { @@ -6812,7 +6973,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_GetEntityIDs() { - ::grpc::Service::MarkMethodStreamed(37, + ::grpc::Service::MarkMethodStreamed(38, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HGetEntityIDsParam, ::milvus::grpc::HEntityIDs>(std::bind(&WithStreamedUnaryMethod_GetEntityIDs::StreamedGetEntityIDs, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_GetEntityIDs() override { @@ -6832,7 +6993,7 @@ class MilvusService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_DeleteEntitiesByID() { - ::grpc::Service::MarkMethodStreamed(38, + ::grpc::Service::MarkMethodStreamed(39, new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::HDeleteByIDParam, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_DeleteEntitiesByID::StreamedDeleteEntitiesByID, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_DeleteEntitiesByID() override { @@ -6846,9 +7007,9 @@ class MilvusService final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedDeleteEntitiesByID(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::HDeleteByIDParam,::milvus::grpc::Status>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; + typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; + typedef WithStreamedUnaryMethod_CreateCollection > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; }; } // namespace grpc diff --git a/sdk/grpc-gen/gen-milvus/milvus.pb.cc b/sdk/grpc-gen/gen-milvus/milvus.pb.cc index b5e05c1a..0c0d76fd 100644 --- a/sdk/grpc-gen/gen-milvus/milvus.pb.cc +++ b/sdk/grpc-gen/gen-milvus/milvus.pb.cc @@ -21,7 +21,7 @@ extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_FieldParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldType_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_HEntity_milvus_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParam_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParamPB_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValuePair_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Mapping_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RangeQuery_milvus_2eproto; @@ -31,6 +31,7 @@ extern PROTOBUF_INTERNAL_EXPORT_status_2eproto ::PROTOBUF_NAMESPACE_ID::internal extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TermQuery_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VectorFieldParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorFieldRecord_milvus_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorParam_milvus_2eproto; extern PROTOBUF_INTERNAL_EXPORT_milvus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_VectorQuery_milvus_2eproto; namespace milvus { namespace grpc { @@ -193,10 +194,18 @@ class GeneralQueryDefaultTypeInternal { const ::milvus::grpc::RangeQuery* range_query_; const ::milvus::grpc::VectorQuery* vector_query_; } _GeneralQuery_default_instance_; +class VectorParamDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _VectorParam_default_instance_; class HSearchParamDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _HSearchParam_default_instance_; +class HSearchParamPBDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _HSearchParamPB_default_instance_; class HSearchInSegmentsParamDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -618,7 +627,7 @@ static void InitDefaultsscc_info_HSearchInSegmentsParam_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_HSearchInSegmentsParam_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_HSearchInSegmentsParam_milvus_2eproto}, { - &scc_info_HSearchParam_milvus_2eproto.base,}}; + &scc_info_HSearchParamPB_milvus_2eproto.base,}}; static void InitDefaultsscc_info_HSearchParam_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -633,6 +642,22 @@ static void InitDefaultsscc_info_HSearchParam_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParam_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_HSearchParam_milvus_2eproto}, { + &scc_info_VectorParam_milvus_2eproto.base, + &scc_info_KeyValuePair_milvus_2eproto.base,}}; + +static void InitDefaultsscc_info_HSearchParamPB_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_HSearchParamPB_default_instance_; + new (ptr) ::milvus::grpc::HSearchParamPB(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::HSearchParamPB::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_HSearchParamPB_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_HSearchParamPB_milvus_2eproto}, { &scc_info_BooleanQuery_milvus_2eproto.base, &scc_info_KeyValuePair_milvus_2eproto.base,}}; @@ -908,6 +933,21 @@ static void InitDefaultsscc_info_VectorIds_milvus_2eproto() { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorIds_milvus_2eproto}, { &scc_info_Status_status_2eproto.base,}}; +static void InitDefaultsscc_info_VectorParam_milvus_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::grpc::_VectorParam_default_instance_; + new (ptr) ::milvus::grpc::VectorParam(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::grpc::VectorParam::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorParam_milvus_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorParam_milvus_2eproto}, { + &scc_info_RowRecord_milvus_2eproto.base,}}; + static void InitDefaultsscc_info_VectorQuery_milvus_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -954,7 +994,7 @@ static void InitDefaultsscc_info_VectorsIdentity_milvus_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VectorsIdentity_milvus_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_VectorsIdentity_milvus_2eproto}, {}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[48]; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[50]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_milvus_2eproto[3]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr; @@ -1252,15 +1292,32 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROT offsetof(::milvus::grpc::GeneralQueryDefaultTypeInternal, vector_query_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::GeneralQuery, query_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, json_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::VectorParam, row_record_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, collection_name_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, partition_tag_array_), - PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, general_query_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, vector_param_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, dsl_), PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParam, extra_params_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, collection_name_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, partition_tag_array_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, general_query_), + PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchParamPB, extra_params_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::grpc::HSearchInSegmentsParam, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -1383,17 +1440,19 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 265, -1, sizeof(::milvus::grpc::VectorQuery)}, { 275, -1, sizeof(::milvus::grpc::BooleanQuery)}, { 282, -1, sizeof(::milvus::grpc::GeneralQuery)}, - { 292, -1, sizeof(::milvus::grpc::HSearchParam)}, - { 301, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)}, - { 308, -1, sizeof(::milvus::grpc::AttrRecord)}, - { 315, -1, sizeof(::milvus::grpc::HEntity)}, - { 327, -1, sizeof(::milvus::grpc::HQueryResult)}, - { 338, -1, sizeof(::milvus::grpc::HInsertParam)}, - { 348, -1, sizeof(::milvus::grpc::HEntityIdentity)}, - { 355, -1, sizeof(::milvus::grpc::HEntityIDs)}, - { 362, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)}, - { 369, -1, sizeof(::milvus::grpc::HDeleteByIDParam)}, - { 376, -1, sizeof(::milvus::grpc::HIndexParam)}, + { 292, -1, sizeof(::milvus::grpc::VectorParam)}, + { 299, -1, sizeof(::milvus::grpc::HSearchParam)}, + { 309, -1, sizeof(::milvus::grpc::HSearchParamPB)}, + { 318, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)}, + { 325, -1, sizeof(::milvus::grpc::AttrRecord)}, + { 332, -1, sizeof(::milvus::grpc::HEntity)}, + { 344, -1, sizeof(::milvus::grpc::HQueryResult)}, + { 355, -1, sizeof(::milvus::grpc::HInsertParam)}, + { 365, -1, sizeof(::milvus::grpc::HEntityIdentity)}, + { 372, -1, sizeof(::milvus::grpc::HEntityIDs)}, + { 379, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)}, + { 386, -1, sizeof(::milvus::grpc::HDeleteByIDParam)}, + { 393, -1, sizeof(::milvus::grpc::HIndexParam)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -1434,7 +1493,9 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&::milvus::grpc::_VectorQuery_default_instance_), reinterpret_cast(&::milvus::grpc::_BooleanQuery_default_instance_), reinterpret_cast(&::milvus::grpc::_GeneralQuery_default_instance_), + reinterpret_cast(&::milvus::grpc::_VectorParam_default_instance_), reinterpret_cast(&::milvus::grpc::_HSearchParam_default_instance_), + reinterpret_cast(&::milvus::grpc::_HSearchParamPB_default_instance_), reinterpret_cast(&::milvus::grpc::_HSearchInSegmentsParam_default_instance_), reinterpret_cast(&::milvus::grpc::_AttrRecord_default_instance_), reinterpret_cast(&::milvus::grpc::_HEntity_default_instance_), @@ -1543,125 +1604,134 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE( "\n\nterm_query\030\002 \001(\0132\026.milvus.grpc.TermQue" "ryH\000\022.\n\013range_query\030\003 \001(\0132\027.milvus.grpc." "RangeQueryH\000\0220\n\014vector_query\030\004 \001(\0132\030.mil" - "vus.grpc.VectorQueryH\000B\007\n\005query\"\247\001\n\014HSea" - "rchParam\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023par" - "tition_tag_array\030\002 \003(\t\0220\n\rgeneral_query\030" - "\003 \001(\0132\031.milvus.grpc.GeneralQuery\022/\n\014extr" - "a_params\030\004 \003(\0132\031.milvus.grpc.KeyValuePai" - "r\"c\n\026HSearchInSegmentsParam\022\030\n\020segment_i" - "d_array\030\001 \003(\t\022/\n\014search_param\030\002 \001(\0132\031.mi" - "lvus.grpc.HSearchParam\"5\n\nAttrRecord\022\021\n\t" - "int_value\030\001 \003(\003\022\024\n\014double_value\030\002 \003(\001\"\363\001" - "\n\007HEntity\022#\n\006status\030\001 \001(\0132\023.milvus.grpc." - "Status\022\021\n\tentity_id\030\002 \003(\003\022\023\n\013field_names" - "\030\003 \003(\t\022)\n\ndata_types\030\004 \003(\0162\025.milvus.grpc" - ".DataType\022\017\n\007row_num\030\005 \001(\003\022*\n\tattr_data\030" - "\006 \003(\0132\027.milvus.grpc.AttrRecord\0223\n\013vector" - "_data\030\007 \003(\0132\036.milvus.grpc.VectorFieldRec" - "ord\"\274\001\n\014HQueryResult\022#\n\006status\030\001 \001(\0132\023.m" - "ilvus.grpc.Status\022$\n\006entity\030\002 \001(\0132\024.milv" - "us.grpc.HEntity\022\017\n\007row_num\030\003 \001(\003\022\r\n\005scor" - "e\030\004 \003(\002\022\020\n\010distance\030\005 \003(\002\022/\n\014extra_param" - "s\030\006 \003(\0132\031.milvus.grpc.KeyValuePair\"\256\001\n\014H" - "InsertParam\022\027\n\017collection_name\030\001 \001(\t\022\025\n\r" - "partition_tag\030\002 \001(\t\022$\n\006entity\030\003 \001(\0132\024.mi" - "lvus.grpc.HEntity\022\027\n\017entity_id_array\030\004 \003" - "(\003\022/\n\014extra_params\030\005 \003(\0132\031.milvus.grpc.K" - "eyValuePair\"6\n\017HEntityIdentity\022\027\n\017collec" - "tion_name\030\001 \001(\t\022\n\n\002id\030\002 \003(\003\"J\n\nHEntityID" - "s\022#\n\006status\030\001 \001(\0132\023.milvus.grpc.Status\022\027" - "\n\017entity_id_array\030\002 \003(\003\"C\n\022HGetEntityIDs" - "Param\022\027\n\017collection_name\030\001 \001(\t\022\024\n\014segmen" - "t_name\030\002 \001(\t\"=\n\020HDeleteByIDParam\022\027\n\017coll" - "ection_name\030\001 \001(\t\022\020\n\010id_array\030\002 \003(\003\"\220\001\n\013" - "HIndexParam\022#\n\006status\030\001 \001(\0132\023.milvus.grp" - "c.Status\022\027\n\017collection_name\030\002 \001(\t\022\022\n\nind" - "ex_type\030\003 \001(\005\022/\n\014extra_params\030\004 \003(\0132\031.mi" - "lvus.grpc.KeyValuePair*\206\001\n\010DataType\022\010\n\004N" - "ULL\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n" - "\005INT64\020\004\022\n\n\006STRING\020\024\022\010\n\004BOOL\020\036\022\t\n\005FLOAT\020" - "(\022\n\n\006DOUBLE\020)\022\n\n\006VECTOR\020d\022\014\n\007UNKNOWN\020\217N*" - "C\n\017CompareOperator\022\006\n\002LT\020\000\022\007\n\003LTE\020\001\022\006\n\002E" - "Q\020\002\022\006\n\002GT\020\003\022\007\n\003GTE\020\004\022\006\n\002NE\020\005*8\n\005Occur\022\013\n" - "\007INVALID\020\000\022\010\n\004MUST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST" - "_NOT\020\0032\321\026\n\rMilvusService\022H\n\020CreateCollec" - "tion\022\035.milvus.grpc.CollectionSchema\032\023.mi" - "lvus.grpc.Status\"\000\022F\n\rHasCollection\022\033.mi" - "lvus.grpc.CollectionName\032\026.milvus.grpc.B" - "oolReply\"\000\022R\n\022DescribeCollection\022\033.milvu" - "s.grpc.CollectionName\032\035.milvus.grpc.Coll" - "ectionSchema\"\000\022Q\n\017CountCollection\022\033.milv" - "us.grpc.CollectionName\032\037.milvus.grpc.Col" - "lectionRowCount\"\000\022J\n\017ShowCollections\022\024.m" - "ilvus.grpc.Command\032\037.milvus.grpc.Collect" - "ionNameList\"\000\022P\n\022ShowCollectionInfo\022\033.mi" - "lvus.grpc.CollectionName\032\033.milvus.grpc.C" - "ollectionInfo\"\000\022D\n\016DropCollection\022\033.milv" - "us.grpc.CollectionName\032\023.milvus.grpc.Sta" - "tus\"\000\022=\n\013CreateIndex\022\027.milvus.grpc.Index" - "Param\032\023.milvus.grpc.Status\"\000\022G\n\rDescribe" - "Index\022\033.milvus.grpc.CollectionName\032\027.mil" - "vus.grpc.IndexParam\"\000\022\?\n\tDropIndex\022\033.mil" - "vus.grpc.CollectionName\032\023.milvus.grpc.St" - "atus\"\000\022E\n\017CreatePartition\022\033.milvus.grpc." - "PartitionParam\032\023.milvus.grpc.Status\"\000\022E\n" - "\014HasPartition\022\033.milvus.grpc.PartitionPar" - "am\032\026.milvus.grpc.BoolReply\"\000\022K\n\016ShowPart" - "itions\022\033.milvus.grpc.CollectionName\032\032.mi" - "lvus.grpc.PartitionList\"\000\022C\n\rDropPartiti" - "on\022\033.milvus.grpc.PartitionParam\032\023.milvus" - ".grpc.Status\"\000\022<\n\006Insert\022\030.milvus.grpc.I" - "nsertParam\032\026.milvus.grpc.VectorIds\"\000\022J\n\016" - "GetVectorsByID\022\034.milvus.grpc.VectorsIden" - "tity\032\030.milvus.grpc.VectorsData\"\000\022H\n\014GetV" - "ectorIDs\022\036.milvus.grpc.GetVectorIDsParam" - "\032\026.milvus.grpc.VectorIds\"\000\022B\n\006Search\022\030.m" - "ilvus.grpc.SearchParam\032\034.milvus.grpc.Top" - "KQueryResult\"\000\022J\n\nSearchByID\022\034.milvus.gr" - "pc.SearchByIDParam\032\034.milvus.grpc.TopKQue" - "ryResult\"\000\022P\n\rSearchInFiles\022\037.milvus.grp" - "c.SearchInFilesParam\032\034.milvus.grpc.TopKQ" - "ueryResult\"\000\0227\n\003Cmd\022\024.milvus.grpc.Comman" - "d\032\030.milvus.grpc.StringReply\"\000\022A\n\nDeleteB" - "yID\022\034.milvus.grpc.DeleteByIDParam\032\023.milv" - "us.grpc.Status\"\000\022G\n\021PreloadCollection\022\033." - "milvus.grpc.CollectionName\032\023.milvus.grpc" - ".Status\"\000\0227\n\005Flush\022\027.milvus.grpc.FlushPa" - "ram\032\023.milvus.grpc.Status\"\000\022=\n\007Compact\022\033." - "milvus.grpc.CollectionName\032\023.milvus.grpc" - ".Status\"\000\022E\n\026CreateHybridCollection\022\024.mi" - "lvus.grpc.Mapping\032\023.milvus.grpc.Status\"\000" - "\022L\n\023HasHybridCollection\022\033.milvus.grpc.Co" - "llectionName\032\026.milvus.grpc.BoolReply\"\000\022J" - "\n\024DropHybridCollection\022\033.milvus.grpc.Col" - "lectionName\032\023.milvus.grpc.Status\"\000\022O\n\030De" - "scribeHybridCollection\022\033.milvus.grpc.Col" - "lectionName\032\024.milvus.grpc.Mapping\"\000\022W\n\025C" - "ountHybridCollection\022\033.milvus.grpc.Colle" - "ctionName\032\037.milvus.grpc.CollectionRowCou" - "nt\"\000\022I\n\025ShowHybridCollections\022\024.milvus.g" - "rpc.Command\032\030.milvus.grpc.MappingList\"\000\022" - "V\n\030ShowHybridCollectionInfo\022\033.milvus.grp" - "c.CollectionName\032\033.milvus.grpc.Collectio" - "nInfo\"\000\022M\n\027PreloadHybridCollection\022\033.mil" - "vus.grpc.CollectionName\032\023.milvus.grpc.St" - "atus\"\000\022D\n\014InsertEntity\022\031.milvus.grpc.HIn" - "sertParam\032\027.milvus.grpc.HEntityIDs\"\000\022F\n\014" - "HybridSearch\022\031.milvus.grpc.HSearchParam\032" - "\031.milvus.grpc.HQueryResult\"\000\022]\n\026HybridSe" - "archInSegments\022#.milvus.grpc.HSearchInSe" - "gmentsParam\032\034.milvus.grpc.TopKQueryResul" - "t\"\000\022E\n\rGetEntityByID\022\034.milvus.grpc.Vecto" - "rsIdentity\032\024.milvus.grpc.HEntity\"\000\022J\n\014Ge" - "tEntityIDs\022\037.milvus.grpc.HGetEntityIDsPa" - "ram\032\027.milvus.grpc.HEntityIDs\"\000\022J\n\022Delete" - "EntitiesByID\022\035.milvus.grpc.HDeleteByIDPa" - "ram\032\023.milvus.grpc.Status\"\000b\006proto3" + "vus.grpc.VectorQueryH\000B\007\n\005query\"G\n\013Vecto" + "rParam\022\014\n\004json\030\001 \001(\t\022*\n\nrow_record\030\002 \003(\013" + "2\026.milvus.grpc.RowRecord\"\262\001\n\014HSearchPara" + "m\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023partition_" + "tag_array\030\002 \003(\t\022.\n\014vector_param\030\003 \003(\0132\030." + "milvus.grpc.VectorParam\022\013\n\003dsl\030\004 \001(\t\022/\n\014" + "extra_params\030\005 \003(\0132\031.milvus.grpc.KeyValu" + "ePair\"\251\001\n\016HSearchParamPB\022\027\n\017collection_n" + "ame\030\001 \001(\t\022\033\n\023partition_tag_array\030\002 \003(\t\0220" + "\n\rgeneral_query\030\003 \001(\0132\031.milvus.grpc.Gene" + "ralQuery\022/\n\014extra_params\030\004 \003(\0132\031.milvus." + "grpc.KeyValuePair\"e\n\026HSearchInSegmentsPa" + "ram\022\030\n\020segment_id_array\030\001 \003(\t\0221\n\014search_" + "param\030\002 \001(\0132\033.milvus.grpc.HSearchParamPB" + "\"5\n\nAttrRecord\022\021\n\tint_value\030\001 \003(\003\022\024\n\014dou" + "ble_value\030\002 \003(\001\"\363\001\n\007HEntity\022#\n\006status\030\001 " + "\001(\0132\023.milvus.grpc.Status\022\021\n\tentity_id\030\002 " + "\003(\003\022\023\n\013field_names\030\003 \003(\t\022)\n\ndata_types\030\004" + " \003(\0162\025.milvus.grpc.DataType\022\017\n\007row_num\030\005" + " \001(\003\022*\n\tattr_data\030\006 \003(\0132\027.milvus.grpc.At" + "trRecord\0223\n\013vector_data\030\007 \003(\0132\036.milvus.g" + "rpc.VectorFieldRecord\"\274\001\n\014HQueryResult\022#" + "\n\006status\030\001 \001(\0132\023.milvus.grpc.Status\022$\n\006e" + "ntity\030\002 \001(\0132\024.milvus.grpc.HEntity\022\017\n\007row" + "_num\030\003 \001(\003\022\r\n\005score\030\004 \003(\002\022\020\n\010distance\030\005 " + "\003(\002\022/\n\014extra_params\030\006 \003(\0132\031.milvus.grpc." + "KeyValuePair\"\256\001\n\014HInsertParam\022\027\n\017collect" + "ion_name\030\001 \001(\t\022\025\n\rpartition_tag\030\002 \001(\t\022$\n" + "\006entity\030\003 \001(\0132\024.milvus.grpc.HEntity\022\027\n\017e" + "ntity_id_array\030\004 \003(\003\022/\n\014extra_params\030\005 \003" + "(\0132\031.milvus.grpc.KeyValuePair\"6\n\017HEntity" + "Identity\022\027\n\017collection_name\030\001 \001(\t\022\n\n\002id\030" + "\002 \003(\003\"J\n\nHEntityIDs\022#\n\006status\030\001 \001(\0132\023.mi" + "lvus.grpc.Status\022\027\n\017entity_id_array\030\002 \003(" + "\003\"C\n\022HGetEntityIDsParam\022\027\n\017collection_na" + "me\030\001 \001(\t\022\024\n\014segment_name\030\002 \001(\t\"=\n\020HDelet" + "eByIDParam\022\027\n\017collection_name\030\001 \001(\t\022\020\n\010i" + "d_array\030\002 \003(\003\"\220\001\n\013HIndexParam\022#\n\006status\030" + "\001 \001(\0132\023.milvus.grpc.Status\022\027\n\017collection" + "_name\030\002 \001(\t\022\022\n\nindex_type\030\003 \001(\005\022/\n\014extra" + "_params\030\004 \003(\0132\031.milvus.grpc.KeyValuePair" + "*\206\001\n\010DataType\022\010\n\004NULL\020\000\022\010\n\004INT8\020\001\022\t\n\005INT" + "16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\n\n\006STRING\020\024\022\010" + "\n\004BOOL\020\036\022\t\n\005FLOAT\020(\022\n\n\006DOUBLE\020)\022\n\n\006VECTO" + "R\020d\022\014\n\007UNKNOWN\020\217N*C\n\017CompareOperator\022\006\n\002" + "LT\020\000\022\007\n\003LTE\020\001\022\006\n\002EQ\020\002\022\006\n\002GT\020\003\022\007\n\003GTE\020\004\022\006" + "\n\002NE\020\005*8\n\005Occur\022\013\n\007INVALID\020\000\022\010\n\004MUST\020\001\022\n" + "\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\0032\235\027\n\rMilvusServi" + "ce\022H\n\020CreateCollection\022\035.milvus.grpc.Col" + "lectionSchema\032\023.milvus.grpc.Status\"\000\022F\n\r" + "HasCollection\022\033.milvus.grpc.CollectionNa" + "me\032\026.milvus.grpc.BoolReply\"\000\022R\n\022Describe" + "Collection\022\033.milvus.grpc.CollectionName\032" + "\035.milvus.grpc.CollectionSchema\"\000\022Q\n\017Coun" + "tCollection\022\033.milvus.grpc.CollectionName" + "\032\037.milvus.grpc.CollectionRowCount\"\000\022J\n\017S" + "howCollections\022\024.milvus.grpc.Command\032\037.m" + "ilvus.grpc.CollectionNameList\"\000\022P\n\022ShowC" + "ollectionInfo\022\033.milvus.grpc.CollectionNa" + "me\032\033.milvus.grpc.CollectionInfo\"\000\022D\n\016Dro" + "pCollection\022\033.milvus.grpc.CollectionName" + "\032\023.milvus.grpc.Status\"\000\022=\n\013CreateIndex\022\027" + ".milvus.grpc.IndexParam\032\023.milvus.grpc.St" + "atus\"\000\022G\n\rDescribeIndex\022\033.milvus.grpc.Co" + "llectionName\032\027.milvus.grpc.IndexParam\"\000\022" + "\?\n\tDropIndex\022\033.milvus.grpc.CollectionNam" + "e\032\023.milvus.grpc.Status\"\000\022E\n\017CreatePartit" + "ion\022\033.milvus.grpc.PartitionParam\032\023.milvu" + "s.grpc.Status\"\000\022E\n\014HasPartition\022\033.milvus" + ".grpc.PartitionParam\032\026.milvus.grpc.BoolR" + "eply\"\000\022K\n\016ShowPartitions\022\033.milvus.grpc.C" + "ollectionName\032\032.milvus.grpc.PartitionLis" + "t\"\000\022C\n\rDropPartition\022\033.milvus.grpc.Parti" + "tionParam\032\023.milvus.grpc.Status\"\000\022<\n\006Inse" + "rt\022\030.milvus.grpc.InsertParam\032\026.milvus.gr" + "pc.VectorIds\"\000\022J\n\016GetVectorsByID\022\034.milvu" + "s.grpc.VectorsIdentity\032\030.milvus.grpc.Vec" + "torsData\"\000\022H\n\014GetVectorIDs\022\036.milvus.grpc" + ".GetVectorIDsParam\032\026.milvus.grpc.VectorI" + "ds\"\000\022B\n\006Search\022\030.milvus.grpc.SearchParam" + "\032\034.milvus.grpc.TopKQueryResult\"\000\022J\n\nSear" + "chByID\022\034.milvus.grpc.SearchByIDParam\032\034.m" + "ilvus.grpc.TopKQueryResult\"\000\022P\n\rSearchIn" + "Files\022\037.milvus.grpc.SearchInFilesParam\032\034" + ".milvus.grpc.TopKQueryResult\"\000\0227\n\003Cmd\022\024." + "milvus.grpc.Command\032\030.milvus.grpc.String" + "Reply\"\000\022A\n\nDeleteByID\022\034.milvus.grpc.Dele" + "teByIDParam\032\023.milvus.grpc.Status\"\000\022G\n\021Pr" + "eloadCollection\022\033.milvus.grpc.Collection" + "Name\032\023.milvus.grpc.Status\"\000\0227\n\005Flush\022\027.m" + "ilvus.grpc.FlushParam\032\023.milvus.grpc.Stat" + "us\"\000\022=\n\007Compact\022\033.milvus.grpc.Collection" + "Name\032\023.milvus.grpc.Status\"\000\022E\n\026CreateHyb" + "ridCollection\022\024.milvus.grpc.Mapping\032\023.mi" + "lvus.grpc.Status\"\000\022L\n\023HasHybridCollectio" + "n\022\033.milvus.grpc.CollectionName\032\026.milvus." + "grpc.BoolReply\"\000\022J\n\024DropHybridCollection" + "\022\033.milvus.grpc.CollectionName\032\023.milvus.g" + "rpc.Status\"\000\022O\n\030DescribeHybridCollection" + "\022\033.milvus.grpc.CollectionName\032\024.milvus.g" + "rpc.Mapping\"\000\022W\n\025CountHybridCollection\022\033" + ".milvus.grpc.CollectionName\032\037.milvus.grp" + "c.CollectionRowCount\"\000\022I\n\025ShowHybridColl" + "ections\022\024.milvus.grpc.Command\032\030.milvus.g" + "rpc.MappingList\"\000\022V\n\030ShowHybridCollectio" + "nInfo\022\033.milvus.grpc.CollectionName\032\033.mil" + "vus.grpc.CollectionInfo\"\000\022M\n\027PreloadHybr" + "idCollection\022\033.milvus.grpc.CollectionNam" + "e\032\023.milvus.grpc.Status\"\000\022D\n\014InsertEntity" + "\022\031.milvus.grpc.HInsertParam\032\027.milvus.grp" + "c.HEntityIDs\"\000\022J\n\016HybridSearchPB\022\033.milvu" + "s.grpc.HSearchParamPB\032\031.milvus.grpc.HQue" + "ryResult\"\000\022F\n\014HybridSearch\022\031.milvus.grpc" + ".HSearchParam\032\031.milvus.grpc.HQueryResult" + "\"\000\022]\n\026HybridSearchInSegments\022#.milvus.gr" + "pc.HSearchInSegmentsParam\032\034.milvus.grpc." + "TopKQueryResult\"\000\022E\n\rGetEntityByID\022\034.mil" + "vus.grpc.VectorsIdentity\032\024.milvus.grpc.H" + "Entity\"\000\022J\n\014GetEntityIDs\022\037.milvus.grpc.H" + "GetEntityIDsParam\032\027.milvus.grpc.HEntityI" + "Ds\"\000\022J\n\022DeleteEntitiesByID\022\035.milvus.grpc" + ".HDeleteByIDParam\032\023.milvus.grpc.Status\"\000" + "b\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[1] = { &::descriptor_table_status_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[47] = { +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[49] = { &scc_info_AttrRecord_milvus_2eproto.base, &scc_info_BoolReply_milvus_2eproto.base, &scc_info_BooleanQuery_milvus_2eproto.base, @@ -1688,6 +1758,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil &scc_info_HQueryResult_milvus_2eproto.base, &scc_info_HSearchInSegmentsParam_milvus_2eproto.base, &scc_info_HSearchParam_milvus_2eproto.base, + &scc_info_HSearchParamPB_milvus_2eproto.base, &scc_info_IndexParam_milvus_2eproto.base, &scc_info_InsertParam_milvus_2eproto.base, &scc_info_KeyValuePair_milvus_2eproto.base, @@ -1706,6 +1777,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil &scc_info_VectorFieldParam_milvus_2eproto.base, &scc_info_VectorFieldRecord_milvus_2eproto.base, &scc_info_VectorIds_milvus_2eproto.base, + &scc_info_VectorParam_milvus_2eproto.base, &scc_info_VectorQuery_milvus_2eproto.base, &scc_info_VectorsData_milvus_2eproto.base, &scc_info_VectorsIdentity_milvus_2eproto.base, @@ -1713,10 +1785,10 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once; static bool descriptor_table_milvus_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = { - &descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8354, - &descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 47, 1, + &descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8688, + &descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 49, 1, schemas, file_default_instances, TableStruct_milvus_2eproto::offsets, - file_level_metadata_milvus_2eproto, 48, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, + file_level_metadata_milvus_2eproto, 50, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. @@ -15618,129 +15690,90 @@ void GeneralQuery::InternalSwap(GeneralQuery* other) { // =================================================================== -void HSearchParam::InitAsDefaultInstance() { - ::milvus::grpc::_HSearchParam_default_instance_._instance.get_mutable()->general_query_ = const_cast< ::milvus::grpc::GeneralQuery*>( - ::milvus::grpc::GeneralQuery::internal_default_instance()); +void VectorParam::InitAsDefaultInstance() { } -class HSearchParam::_Internal { +class VectorParam::_Internal { public: - static const ::milvus::grpc::GeneralQuery& general_query(const HSearchParam* msg); }; -const ::milvus::grpc::GeneralQuery& -HSearchParam::_Internal::general_query(const HSearchParam* msg) { - return *msg->general_query_; -} -HSearchParam::HSearchParam() +VectorParam::VectorParam() : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(constructor:milvus.grpc.VectorParam) } -HSearchParam::HSearchParam(const HSearchParam& from) +VectorParam::VectorParam(const VectorParam& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), - partition_tag_array_(from.partition_tag_array_), - extra_params_(from.extra_params_) { + row_record_(from.row_record_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.collection_name().empty()) { - collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); - } - if (from.has_general_query()) { - general_query_ = new ::milvus::grpc::GeneralQuery(*from.general_query_); - } else { - general_query_ = nullptr; + json_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.json().empty()) { + json_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_); } - // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(copy_constructor:milvus.grpc.VectorParam) } -void HSearchParam::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParam_milvus_2eproto.base); - collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - general_query_ = nullptr; +void VectorParam::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_VectorParam_milvus_2eproto.base); + json_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -HSearchParam::~HSearchParam() { - // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParam) +VectorParam::~VectorParam() { + // @@protoc_insertion_point(destructor:milvus.grpc.VectorParam) SharedDtor(); } -void HSearchParam::SharedDtor() { - collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete general_query_; +void VectorParam::SharedDtor() { + json_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void HSearchParam::SetCachedSize(int size) const { +void VectorParam::SetCachedSize(int size) const { _cached_size_.Set(size); } -const HSearchParam& HSearchParam::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParam_milvus_2eproto.base); +const VectorParam& VectorParam::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_VectorParam_milvus_2eproto.base); return *internal_default_instance(); } -void HSearchParam::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParam) +void VectorParam::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - partition_tag_array_.Clear(); - extra_params_.Clear(); - collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { - delete general_query_; - } - general_query_ = nullptr; + row_record_.Clear(); + json_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* HSearchParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* VectorParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // string collection_name = 1; + // string json = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParam.collection_name"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_json(), ptr, ctx, "milvus.grpc.VectorParam.json"); CHK_(ptr); } else goto handle_unusual; continue; - // repeated string partition_tag_array = 2; + // repeated .milvus.grpc.RowRecord row_record = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr -= 1; do { ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParam.partition_tag_array"); + ptr = ctx->ParseMessage(add_row_record(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); } else goto handle_unusual; continue; - // .milvus.grpc.GeneralQuery general_query = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(mutable_general_query(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .milvus.grpc.KeyValuePair extra_params = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(add_extra_params(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); - } else goto handle_unusual; - continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -15761,63 +15794,36 @@ failure: #undef CHK_ } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool HSearchParam::MergePartialFromCodedStream( +bool VectorParam::MergePartialFromCodedStream( ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_start:milvus.grpc.VectorParam) for (;;) { ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string collection_name = 1; + // string json = 1; case 1: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_collection_name())); + input, this->mutable_json())); DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.grpc.HSearchParam.collection_name")); + "milvus.grpc.VectorParam.json")); } else { goto handle_unusual; } break; } - // repeated string partition_tag_array = 2; + // repeated .milvus.grpc.RowRecord row_record = 2; case 2: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_partition_tag_array())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(this->partition_tag_array_size() - 1).data(), - static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.grpc.HSearchParam.partition_tag_array")); - } else { - goto handle_unusual; - } - break; - } - - // .milvus.grpc.GeneralQuery general_query = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, mutable_general_query())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .milvus.grpc.KeyValuePair extra_params = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_extra_params())); + input, add_row_record())); } else { goto handle_unusual; } @@ -15836,53 +15842,37 @@ bool HSearchParam::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_success:milvus.grpc.VectorParam) return true; failure: - // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(parse_failure:milvus.grpc.VectorParam) return false; #undef DO_ } #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void HSearchParam::SerializeWithCachedSizes( +void VectorParam::SerializeWithCachedSizes( ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.collection_name"); + "milvus.grpc.VectorParam.json"); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->collection_name(), output); - } - - // repeated string partition_tag_array = 2; - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.partition_tag_array"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 2, this->partition_tag_array(i), output); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, _Internal::general_query(this), output); + 1, this->json(), output); } - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; for (unsigned int i = 0, - n = static_cast(this->extra_params_size()); i < n; i++) { + n = static_cast(this->row_record_size()); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->extra_params(static_cast(i)), + 2, + this->row_record(static_cast(i)), output); } @@ -15890,61 +15880,44 @@ void HSearchParam::SerializeWithCachedSizes( ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } - // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_end:milvus.grpc.VectorParam) } -::PROTOBUF_NAMESPACE_ID::uint8* HSearchParam::InternalSerializeWithCachedSizesToArray( +::PROTOBUF_NAMESPACE_ID::uint8* VectorParam::InternalSerializeWithCachedSizesToArray( ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->collection_name().data(), static_cast(this->collection_name().length()), + this->json().data(), static_cast(this->json().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.collection_name"); + "milvus.grpc.VectorParam.json"); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->collection_name(), target); - } - - // repeated string partition_tag_array = 2; - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.grpc.HSearchParam.partition_tag_array"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(2, this->partition_tag_array(i), target); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, _Internal::general_query(this), target); + 1, this->json(), target); } - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; for (unsigned int i = 0, - n = static_cast(this->extra_params_size()); i < n; i++) { + n = static_cast(this->row_record_size()); i < n; i++) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 4, this->extra_params(static_cast(i)), target); + 2, this->row_record(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } - // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.VectorParam) return target; } -size_t HSearchParam::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParam) +size_t VectorParam::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.VectorParam) size_t total_size = 0; if (_internal_metadata_.have_unknown_fields()) { @@ -15956,37 +15929,22 @@ size_t HSearchParam::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated string partition_tag_array = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); - for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->partition_tag_array(i)); - } - - // repeated .milvus.grpc.KeyValuePair extra_params = 4; + // repeated .milvus.grpc.RowRecord row_record = 2; { - unsigned int count = static_cast(this->extra_params_size()); + unsigned int count = static_cast(this->row_record_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->extra_params(static_cast(i))); + this->row_record(static_cast(i))); } } - // string collection_name = 1; - if (this->collection_name().size() > 0) { + // string json = 1; + if (this->json().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->collection_name()); - } - - // .milvus.grpc.GeneralQuery general_query = 3; - if (this->has_general_query()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *general_query_); + this->json()); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); @@ -15994,100 +15952,1040 @@ size_t HSearchParam::ByteSizeLong() const { return total_size; } -void HSearchParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParam) +void VectorParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.VectorParam) GOOGLE_DCHECK_NE(&from, this); - const HSearchParam* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const VectorParam* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.VectorParam) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.VectorParam) MergeFrom(*source); } } -void HSearchParam::MergeFrom(const HSearchParam& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParam) +void VectorParam::MergeFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.VectorParam) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - partition_tag_array_.MergeFrom(from.partition_tag_array_); - extra_params_.MergeFrom(from.extra_params_); - if (from.collection_name().size() > 0) { + row_record_.MergeFrom(from.row_record_); + if (from.json().size() > 0) { - collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); - } - if (from.has_general_query()) { - mutable_general_query()->::milvus::grpc::GeneralQuery::MergeFrom(from.general_query()); + json_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_); } } -void HSearchParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParam) +void VectorParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.VectorParam) if (&from == this) return; Clear(); MergeFrom(from); } -void HSearchParam::CopyFrom(const HSearchParam& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParam) +void VectorParam::CopyFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.VectorParam) if (&from == this) return; Clear(); MergeFrom(from); } -bool HSearchParam::IsInitialized() const { +bool VectorParam::IsInitialized() const { return true; } -void HSearchParam::InternalSwap(HSearchParam* other) { +void VectorParam::InternalSwap(VectorParam* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); - CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); - collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + CastToBase(&row_record_)->InternalSwap(CastToBase(&other->row_record_)); + json_.Swap(&other->json_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - swap(general_query_, other->general_query_); } -::PROTOBUF_NAMESPACE_ID::Metadata HSearchParam::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata VectorParam::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void HSearchInSegmentsParam::InitAsDefaultInstance() { - ::milvus::grpc::_HSearchInSegmentsParam_default_instance_._instance.get_mutable()->search_param_ = const_cast< ::milvus::grpc::HSearchParam*>( - ::milvus::grpc::HSearchParam::internal_default_instance()); +void HSearchParam::InitAsDefaultInstance() { } -class HSearchInSegmentsParam::_Internal { +class HSearchParam::_Internal { public: - static const ::milvus::grpc::HSearchParam& search_param(const HSearchInSegmentsParam* msg); }; -const ::milvus::grpc::HSearchParam& -HSearchInSegmentsParam::_Internal::search_param(const HSearchInSegmentsParam* msg) { - return *msg->search_param_; -} -HSearchInSegmentsParam::HSearchInSegmentsParam() +HSearchParam::HSearchParam() : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.grpc.HSearchInSegmentsParam) + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParam) } -HSearchInSegmentsParam::HSearchInSegmentsParam(const HSearchInSegmentsParam& from) +HSearchParam::HSearchParam(const HSearchParam& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), - segment_id_array_(from.segment_id_array_) { + partition_tag_array_(from.partition_tag_array_), + vector_param_(from.vector_param_), + extra_params_(from.extra_params_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_search_param()) { - search_param_ = new ::milvus::grpc::HSearchParam(*from.search_param_); - } else { + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.collection_name().empty()) { + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.dsl().empty()) { + dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_); + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParam) +} + +void HSearchParam::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParam_milvus_2eproto.base); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +HSearchParam::~HSearchParam() { + // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParam) + SharedDtor(); +} + +void HSearchParam::SharedDtor() { + collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HSearchParam::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HSearchParam& HSearchParam::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParam_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void HSearchParam::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + partition_tag_array_.Clear(); + vector_param_.Clear(); + extra_params_.Clear(); + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* HSearchParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string collection_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParam.collection_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string partition_tag_array = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParam.partition_tag_array"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.VectorParam vector_param = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_vector_param(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } else goto handle_unusual; + continue; + // string dsl = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_dsl(), ptr, ctx, "milvus.grpc.HSearchParam.dsl"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_extra_params(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool HSearchParam::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParam) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string collection_name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_collection_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.collection_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string partition_tag_array = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_partition_tag_array())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(this->partition_tag_array_size() - 1).data(), + static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.partition_tag_array")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_vector_param())); + } else { + goto handle_unusual; + } + break; + } + + // string dsl = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_dsl())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParam.dsl")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_extra_params())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParam) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParam) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void HSearchParam::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.collection_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->collection_name(), output); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.partition_tag_array"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 2, this->partition_tag_array(i), output); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + for (unsigned int i = 0, + n = static_cast(this->vector_param_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->vector_param(static_cast(i)), + output); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.dsl"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->dsl(), output); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, + this->extra_params(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParam) +} + +::PROTOBUF_NAMESPACE_ID::uint8* HSearchParam::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.collection_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->collection_name(), target); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.partition_tag_array"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(2, this->partition_tag_array(i), target); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + for (unsigned int i = 0, + n = static_cast(this->vector_param_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->vector_param(static_cast(i)), target); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->dsl().data(), static_cast(this->dsl().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParam.dsl"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 4, this->dsl(), target); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, this->extra_params(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParam) + return target; +} + +size_t HSearchParam::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParam) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string partition_tag_array = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->partition_tag_array(i)); + } + + // repeated .milvus.grpc.VectorParam vector_param = 3; + { + unsigned int count = static_cast(this->vector_param_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->vector_param(static_cast(i))); + } + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + { + unsigned int count = static_cast(this->extra_params_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->extra_params(static_cast(i))); + } + } + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->collection_name()); + } + + // string dsl = 4; + if (this->dsl().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->dsl()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HSearchParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParam) + GOOGLE_DCHECK_NE(&from, this); + const HSearchParam* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParam) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParam) + MergeFrom(*source); + } +} + +void HSearchParam::MergeFrom(const HSearchParam& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParam) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + partition_tag_array_.MergeFrom(from.partition_tag_array_); + vector_param_.MergeFrom(from.vector_param_); + extra_params_.MergeFrom(from.extra_params_); + if (from.collection_name().size() > 0) { + + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.dsl().size() > 0) { + + dsl_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dsl_); + } +} + +void HSearchParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HSearchParam::CopyFrom(const HSearchParam& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HSearchParam::IsInitialized() const { + return true; +} + +void HSearchParam::InternalSwap(HSearchParam* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); + CastToBase(&vector_param_)->InternalSwap(CastToBase(&other->vector_param_)); + CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); + collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + dsl_.Swap(&other->dsl_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HSearchParam::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void HSearchParamPB::InitAsDefaultInstance() { + ::milvus::grpc::_HSearchParamPB_default_instance_._instance.get_mutable()->general_query_ = const_cast< ::milvus::grpc::GeneralQuery*>( + ::milvus::grpc::GeneralQuery::internal_default_instance()); +} +class HSearchParamPB::_Internal { + public: + static const ::milvus::grpc::GeneralQuery& general_query(const HSearchParamPB* msg); +}; + +const ::milvus::grpc::GeneralQuery& +HSearchParamPB::_Internal::general_query(const HSearchParamPB* msg) { + return *msg->general_query_; +} +HSearchParamPB::HSearchParamPB() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchParamPB) +} +HSearchParamPB::HSearchParamPB(const HSearchParamPB& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + partition_tag_array_(from.partition_tag_array_), + extra_params_(from.extra_params_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.collection_name().empty()) { + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.has_general_query()) { + general_query_ = new ::milvus::grpc::GeneralQuery(*from.general_query_); + } else { + general_query_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchParamPB) +} + +void HSearchParamPB::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HSearchParamPB_milvus_2eproto.base); + collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + general_query_ = nullptr; +} + +HSearchParamPB::~HSearchParamPB() { + // @@protoc_insertion_point(destructor:milvus.grpc.HSearchParamPB) + SharedDtor(); +} + +void HSearchParamPB::SharedDtor() { + collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete general_query_; +} + +void HSearchParamPB::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HSearchParamPB& HSearchParamPB::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HSearchParamPB_milvus_2eproto.base); + return *internal_default_instance(); +} + + +void HSearchParamPB::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + partition_tag_array_.Clear(); + extra_params_.Clear(); + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { + delete general_query_; + } + general_query_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* HSearchParamPB::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string collection_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.HSearchParamPB.collection_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated string partition_tag_array = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.HSearchParamPB.partition_tag_array"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // .milvus.grpc.GeneralQuery general_query = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(mutable_general_query(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_extra_params(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool HSearchParamPB::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.grpc.HSearchParamPB) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string collection_name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_collection_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParamPB.collection_name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string partition_tag_array = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_partition_tag_array())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(this->partition_tag_array_size() - 1).data(), + static_cast(this->partition_tag_array(this->partition_tag_array_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.grpc.HSearchParamPB.partition_tag_array")); + } else { + goto handle_unusual; + } + break; + } + + // .milvus.grpc.GeneralQuery general_query = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_general_query())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_extra_params())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.grpc.HSearchParamPB) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.grpc.HSearchParamPB) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void HSearchParamPB::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.collection_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->collection_name(), output); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.partition_tag_array"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 2, this->partition_tag_array(i), output); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, _Internal::general_query(this), output); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, + this->extra_params(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.grpc.HSearchParamPB) +} + +::PROTOBUF_NAMESPACE_ID::uint8* HSearchParamPB::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), static_cast(this->collection_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.collection_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->collection_name(), target); + } + + // repeated string partition_tag_array = 2; + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag_array(i).data(), static_cast(this->partition_tag_array(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.grpc.HSearchParamPB.partition_tag_array"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(2, this->partition_tag_array(i), target); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, _Internal::general_query(this), target); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + for (unsigned int i = 0, + n = static_cast(this->extra_params_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 4, this->extra_params(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.HSearchParamPB) + return target; +} + +size_t HSearchParamPB::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.HSearchParamPB) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string partition_tag_array = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size()); + for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->partition_tag_array(i)); + } + + // repeated .milvus.grpc.KeyValuePair extra_params = 4; + { + unsigned int count = static_cast(this->extra_params_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->extra_params(static_cast(i))); + } + } + + // string collection_name = 1; + if (this->collection_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->collection_name()); + } + + // .milvus.grpc.GeneralQuery general_query = 3; + if (this->has_general_query()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *general_query_); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HSearchParamPB::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.HSearchParamPB) + GOOGLE_DCHECK_NE(&from, this); + const HSearchParamPB* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.HSearchParamPB) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.HSearchParamPB) + MergeFrom(*source); + } +} + +void HSearchParamPB::MergeFrom(const HSearchParamPB& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.HSearchParamPB) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + partition_tag_array_.MergeFrom(from.partition_tag_array_); + extra_params_.MergeFrom(from.extra_params_); + if (from.collection_name().size() > 0) { + + collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.has_general_query()) { + mutable_general_query()->::milvus::grpc::GeneralQuery::MergeFrom(from.general_query()); + } +} + +void HSearchParamPB::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.HSearchParamPB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HSearchParamPB::CopyFrom(const HSearchParamPB& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.HSearchParamPB) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HSearchParamPB::IsInitialized() const { + return true; +} + +void HSearchParamPB::InternalSwap(HSearchParamPB* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_)); + CastToBase(&extra_params_)->InternalSwap(CastToBase(&other->extra_params_)); + collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(general_query_, other->general_query_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HSearchParamPB::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void HSearchInSegmentsParam::InitAsDefaultInstance() { + ::milvus::grpc::_HSearchInSegmentsParam_default_instance_._instance.get_mutable()->search_param_ = const_cast< ::milvus::grpc::HSearchParamPB*>( + ::milvus::grpc::HSearchParamPB::internal_default_instance()); +} +class HSearchInSegmentsParam::_Internal { + public: + static const ::milvus::grpc::HSearchParamPB& search_param(const HSearchInSegmentsParam* msg); +}; + +const ::milvus::grpc::HSearchParamPB& +HSearchInSegmentsParam::_Internal::search_param(const HSearchInSegmentsParam* msg) { + return *msg->search_param_; +} +HSearchInSegmentsParam::HSearchInSegmentsParam() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.grpc.HSearchInSegmentsParam) +} +HSearchInSegmentsParam::HSearchInSegmentsParam(const HSearchInSegmentsParam& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + segment_id_array_(from.segment_id_array_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_search_param()) { + search_param_ = new ::milvus::grpc::HSearchParamPB(*from.search_param_); + } else { search_param_ = nullptr; } // @@protoc_insertion_point(copy_constructor:milvus.grpc.HSearchInSegmentsParam) @@ -16150,7 +17048,7 @@ const char* HSearchInSegmentsParam::_InternalParse(const char* ptr, ::PROTOBUF_N } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); } else goto handle_unusual; continue; - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(mutable_search_param(), ptr); @@ -16203,7 +17101,7 @@ bool HSearchInSegmentsParam::MergePartialFromCodedStream( break; } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; case 2: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( @@ -16251,7 +17149,7 @@ void HSearchInSegmentsParam::SerializeWithCachedSizes( 1, this->segment_id_array(i), output); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, _Internal::search_param(this), output); @@ -16280,7 +17178,7 @@ void HSearchInSegmentsParam::SerializeWithCachedSizes( WriteStringToArray(1, this->segment_id_array(i), target); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -16316,7 +17214,7 @@ size_t HSearchInSegmentsParam::ByteSizeLong() const { this->segment_id_array(i)); } - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; if (this->has_search_param()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -16352,7 +17250,7 @@ void HSearchInSegmentsParam::MergeFrom(const HSearchInSegmentsParam& from) { segment_id_array_.MergeFrom(from.segment_id_array_); if (from.has_search_param()) { - mutable_search_param()->::milvus::grpc::HSearchParam::MergeFrom(from.search_param()); + mutable_search_param()->::milvus::grpc::HSearchParamPB::MergeFrom(from.search_param()); } } @@ -20348,9 +21246,15 @@ template<> PROTOBUF_NOINLINE ::milvus::grpc::BooleanQuery* Arena::CreateMaybeMes template<> PROTOBUF_NOINLINE ::milvus::grpc::GeneralQuery* Arena::CreateMaybeMessage< ::milvus::grpc::GeneralQuery >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::GeneralQuery >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::grpc::VectorParam* Arena::CreateMaybeMessage< ::milvus::grpc::VectorParam >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::VectorParam >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchParam* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchParam >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::HSearchParam >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchParamPB* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchParamPB >(Arena* arena) { + return Arena::CreateInternal< ::milvus::grpc::HSearchParamPB >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::grpc::HSearchInSegmentsParam* Arena::CreateMaybeMessage< ::milvus::grpc::HSearchInSegmentsParam >(Arena* arena) { return Arena::CreateInternal< ::milvus::grpc::HSearchInSegmentsParam >(arena); } diff --git a/sdk/grpc-gen/gen-milvus/milvus.pb.h b/sdk/grpc-gen/gen-milvus/milvus.pb.h index 4088920a..202e3535 100644 --- a/sdk/grpc-gen/gen-milvus/milvus.pb.h +++ b/sdk/grpc-gen/gen-milvus/milvus.pb.h @@ -49,7 +49,7 @@ struct TableStruct_milvus_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[48] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[50] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -139,6 +139,9 @@ extern HSearchInSegmentsParamDefaultTypeInternal _HSearchInSegmentsParam_default class HSearchParam; class HSearchParamDefaultTypeInternal; extern HSearchParamDefaultTypeInternal _HSearchParam_default_instance_; +class HSearchParamPB; +class HSearchParamPBDefaultTypeInternal; +extern HSearchParamPBDefaultTypeInternal _HSearchParamPB_default_instance_; class IndexParam; class IndexParamDefaultTypeInternal; extern IndexParamDefaultTypeInternal _IndexParam_default_instance_; @@ -193,6 +196,9 @@ extern VectorFieldRecordDefaultTypeInternal _VectorFieldRecord_default_instance_ class VectorIds; class VectorIdsDefaultTypeInternal; extern VectorIdsDefaultTypeInternal _VectorIds_default_instance_; +class VectorParam; +class VectorParamDefaultTypeInternal; +extern VectorParamDefaultTypeInternal _VectorParam_default_instance_; class VectorQuery; class VectorQueryDefaultTypeInternal; extern VectorQueryDefaultTypeInternal _VectorQuery_default_instance_; @@ -232,6 +238,7 @@ template<> ::milvus::grpc::HInsertParam* Arena::CreateMaybeMessage<::milvus::grp template<> ::milvus::grpc::HQueryResult* Arena::CreateMaybeMessage<::milvus::grpc::HQueryResult>(Arena*); template<> ::milvus::grpc::HSearchInSegmentsParam* Arena::CreateMaybeMessage<::milvus::grpc::HSearchInSegmentsParam>(Arena*); template<> ::milvus::grpc::HSearchParam* Arena::CreateMaybeMessage<::milvus::grpc::HSearchParam>(Arena*); +template<> ::milvus::grpc::HSearchParamPB* Arena::CreateMaybeMessage<::milvus::grpc::HSearchParamPB>(Arena*); template<> ::milvus::grpc::IndexParam* Arena::CreateMaybeMessage<::milvus::grpc::IndexParam>(Arena*); template<> ::milvus::grpc::InsertParam* Arena::CreateMaybeMessage<::milvus::grpc::InsertParam>(Arena*); template<> ::milvus::grpc::KeyValuePair* Arena::CreateMaybeMessage<::milvus::grpc::KeyValuePair>(Arena*); @@ -250,6 +257,7 @@ template<> ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage<::milvus:: template<> ::milvus::grpc::VectorFieldParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldParam>(Arena*); template<> ::milvus::grpc::VectorFieldRecord* Arena::CreateMaybeMessage<::milvus::grpc::VectorFieldRecord>(Arena*); template<> ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage<::milvus::grpc::VectorIds>(Arena*); +template<> ::milvus::grpc::VectorParam* Arena::CreateMaybeMessage<::milvus::grpc::VectorParam>(Arena*); template<> ::milvus::grpc::VectorQuery* Arena::CreateMaybeMessage<::milvus::grpc::VectorQuery>(Arena*); template<> ::milvus::grpc::VectorsData* Arena::CreateMaybeMessage<::milvus::grpc::VectorsData>(Arena*); template<> ::milvus::grpc::VectorsIdentity* Arena::CreateMaybeMessage<::milvus::grpc::VectorsIdentity>(Arena*); @@ -6213,6 +6221,156 @@ class GeneralQuery : }; // ------------------------------------------------------------------- +class VectorParam : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.VectorParam) */ { + public: + VectorParam(); + virtual ~VectorParam(); + + VectorParam(const VectorParam& from); + VectorParam(VectorParam&& from) noexcept + : VectorParam() { + *this = ::std::move(from); + } + + inline VectorParam& operator=(const VectorParam& from) { + CopyFrom(from); + return *this; + } + inline VectorParam& operator=(VectorParam&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const VectorParam& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VectorParam* internal_default_instance() { + return reinterpret_cast( + &_VectorParam_default_instance_); + } + static constexpr int kIndexInFileMessages = + 37; + + friend void swap(VectorParam& a, VectorParam& b) { + a.Swap(&b); + } + inline void Swap(VectorParam* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VectorParam* New() const final { + return CreateMaybeMessage(nullptr); + } + + VectorParam* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const VectorParam& from); + void MergeFrom(const VectorParam& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VectorParam* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.VectorParam"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRowRecordFieldNumber = 2, + kJsonFieldNumber = 1, + }; + // repeated .milvus.grpc.RowRecord row_record = 2; + int row_record_size() const; + void clear_row_record(); + ::milvus::grpc::RowRecord* mutable_row_record(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* + mutable_row_record(); + const ::milvus::grpc::RowRecord& row_record(int index) const; + ::milvus::grpc::RowRecord* add_row_record(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& + row_record() const; + + // string json = 1; + void clear_json(); + const std::string& json() const; + void set_json(const std::string& value); + void set_json(std::string&& value); + void set_json(const char* value); + void set_json(const char* value, size_t size); + std::string* mutable_json(); + std::string* release_json(); + void set_allocated_json(std::string* json); + + // @@protoc_insertion_point(class_scope:milvus.grpc.VectorParam) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord > row_record_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + class HSearchParam : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HSearchParam) */ { public: @@ -6255,7 +6413,7 @@ class HSearchParam : &_HSearchParam_default_instance_); } static constexpr int kIndexInFileMessages = - 37; + 38; friend void swap(HSearchParam& a, HSearchParam& b) { a.Swap(&b); @@ -6325,6 +6483,201 @@ class HSearchParam : // accessors ------------------------------------------------------- + enum : int { + kPartitionTagArrayFieldNumber = 2, + kVectorParamFieldNumber = 3, + kExtraParamsFieldNumber = 5, + kCollectionNameFieldNumber = 1, + kDslFieldNumber = 4, + }; + // repeated string partition_tag_array = 2; + int partition_tag_array_size() const; + void clear_partition_tag_array(); + const std::string& partition_tag_array(int index) const; + std::string* mutable_partition_tag_array(int index); + void set_partition_tag_array(int index, const std::string& value); + void set_partition_tag_array(int index, std::string&& value); + void set_partition_tag_array(int index, const char* value); + void set_partition_tag_array(int index, const char* value, size_t size); + std::string* add_partition_tag_array(); + void add_partition_tag_array(const std::string& value); + void add_partition_tag_array(std::string&& value); + void add_partition_tag_array(const char* value); + void add_partition_tag_array(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& partition_tag_array() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_partition_tag_array(); + + // repeated .milvus.grpc.VectorParam vector_param = 3; + int vector_param_size() const; + void clear_vector_param(); + ::milvus::grpc::VectorParam* mutable_vector_param(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >* + mutable_vector_param(); + const ::milvus::grpc::VectorParam& vector_param(int index) const; + ::milvus::grpc::VectorParam* add_vector_param(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >& + vector_param() const; + + // repeated .milvus.grpc.KeyValuePair extra_params = 5; + int extra_params_size() const; + void clear_extra_params(); + ::milvus::grpc::KeyValuePair* mutable_extra_params(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* + mutable_extra_params(); + const ::milvus::grpc::KeyValuePair& extra_params(int index) const; + ::milvus::grpc::KeyValuePair* add_extra_params(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& + extra_params() const; + + // string collection_name = 1; + void clear_collection_name(); + const std::string& collection_name() const; + void set_collection_name(const std::string& value); + void set_collection_name(std::string&& value); + void set_collection_name(const char* value); + void set_collection_name(const char* value, size_t size); + std::string* mutable_collection_name(); + std::string* release_collection_name(); + void set_allocated_collection_name(std::string* collection_name); + + // string dsl = 4; + void clear_dsl(); + const std::string& dsl() const; + void set_dsl(const std::string& value); + void set_dsl(std::string&& value); + void set_dsl(const char* value); + void set_dsl(const char* value, size_t size); + std::string* mutable_dsl(); + std::string* release_dsl(); + void set_allocated_dsl(std::string* dsl); + + // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParam) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField partition_tag_array_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam > vector_param_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair > extra_params_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collection_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dsl_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_milvus_2eproto; +}; +// ------------------------------------------------------------------- + +class HSearchParamPB : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.HSearchParamPB) */ { + public: + HSearchParamPB(); + virtual ~HSearchParamPB(); + + HSearchParamPB(const HSearchParamPB& from); + HSearchParamPB(HSearchParamPB&& from) noexcept + : HSearchParamPB() { + *this = ::std::move(from); + } + + inline HSearchParamPB& operator=(const HSearchParamPB& from) { + CopyFrom(from); + return *this; + } + inline HSearchParamPB& operator=(HSearchParamPB&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const HSearchParamPB& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HSearchParamPB* internal_default_instance() { + return reinterpret_cast( + &_HSearchParamPB_default_instance_); + } + static constexpr int kIndexInFileMessages = + 39; + + friend void swap(HSearchParamPB& a, HSearchParamPB& b) { + a.Swap(&b); + } + inline void Swap(HSearchParamPB* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline HSearchParamPB* New() const final { + return CreateMaybeMessage(nullptr); + } + + HSearchParamPB* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const HSearchParamPB& from); + void MergeFrom(const HSearchParamPB& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HSearchParamPB* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.grpc.HSearchParamPB"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto); + return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { kPartitionTagArrayFieldNumber = 2, kExtraParamsFieldNumber = 4, @@ -6378,7 +6731,7 @@ class HSearchParam : ::milvus::grpc::GeneralQuery* mutable_general_query(); void set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query); - // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParam) + // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchParamPB) private: class _Internal; @@ -6434,7 +6787,7 @@ class HSearchInSegmentsParam : &_HSearchInSegmentsParam_default_instance_); } static constexpr int kIndexInFileMessages = - 38; + 40; friend void swap(HSearchInSegmentsParam& a, HSearchInSegmentsParam& b) { a.Swap(&b); @@ -6525,13 +6878,13 @@ class HSearchInSegmentsParam : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& segment_id_array() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_segment_id_array(); - // .milvus.grpc.HSearchParam search_param = 2; + // .milvus.grpc.HSearchParamPB search_param = 2; bool has_search_param() const; void clear_search_param(); - const ::milvus::grpc::HSearchParam& search_param() const; - ::milvus::grpc::HSearchParam* release_search_param(); - ::milvus::grpc::HSearchParam* mutable_search_param(); - void set_allocated_search_param(::milvus::grpc::HSearchParam* search_param); + const ::milvus::grpc::HSearchParamPB& search_param() const; + ::milvus::grpc::HSearchParamPB* release_search_param(); + ::milvus::grpc::HSearchParamPB* mutable_search_param(); + void set_allocated_search_param(::milvus::grpc::HSearchParamPB* search_param); // @@protoc_insertion_point(class_scope:milvus.grpc.HSearchInSegmentsParam) private: @@ -6539,7 +6892,7 @@ class HSearchInSegmentsParam : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField segment_id_array_; - ::milvus::grpc::HSearchParam* search_param_; + ::milvus::grpc::HSearchParamPB* search_param_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_milvus_2eproto; }; @@ -6587,7 +6940,7 @@ class AttrRecord : &_AttrRecord_default_instance_); } static constexpr int kIndexInFileMessages = - 39; + 41; friend void swap(AttrRecord& a, AttrRecord& b) { a.Swap(&b); @@ -6739,7 +7092,7 @@ class HEntity : &_HEntity_default_instance_); } static constexpr int kIndexInFileMessages = - 40; + 42; friend void swap(HEntity& a, HEntity& b) { a.Swap(&b); @@ -6951,7 +7304,7 @@ class HQueryResult : &_HQueryResult_default_instance_); } static constexpr int kIndexInFileMessages = - 41; + 43; friend void swap(HQueryResult& a, HQueryResult& b) { a.Swap(&b); @@ -7143,7 +7496,7 @@ class HInsertParam : &_HInsertParam_default_instance_); } static constexpr int kIndexInFileMessages = - 42; + 44; friend void swap(HInsertParam& a, HInsertParam& b) { a.Swap(&b); @@ -7330,7 +7683,7 @@ class HEntityIdentity : &_HEntityIdentity_default_instance_); } static constexpr int kIndexInFileMessages = - 43; + 45; friend void swap(HEntityIdentity& a, HEntityIdentity& b) { a.Swap(&b); @@ -7481,7 +7834,7 @@ class HEntityIDs : &_HEntityIDs_default_instance_); } static constexpr int kIndexInFileMessages = - 44; + 46; friend void swap(HEntityIDs& a, HEntityIDs& b) { a.Swap(&b); @@ -7629,7 +7982,7 @@ class HGetEntityIDsParam : &_HGetEntityIDsParam_default_instance_); } static constexpr int kIndexInFileMessages = - 45; + 47; friend void swap(HGetEntityIDsParam& a, HGetEntityIDsParam& b) { a.Swap(&b); @@ -7779,7 +8132,7 @@ class HDeleteByIDParam : &_HDeleteByIDParam_default_instance_); } static constexpr int kIndexInFileMessages = - 46; + 48; friend void swap(HDeleteByIDParam& a, HDeleteByIDParam& b) { a.Swap(&b); @@ -7930,7 +8283,7 @@ class HIndexParam : &_HIndexParam_default_instance_); } static constexpr int kIndexInFileMessages = - 47; + 49; friend void swap(HIndexParam& a, HIndexParam& b) { a.Swap(&b); @@ -12147,6 +12500,91 @@ inline GeneralQuery::QueryCase GeneralQuery::query_case() const { } // ------------------------------------------------------------------- +// VectorParam + +// string json = 1; +inline void VectorParam::clear_json() { + json_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& VectorParam::json() const { + // @@protoc_insertion_point(field_get:milvus.grpc.VectorParam.json) + return json_.GetNoArena(); +} +inline void VectorParam::set_json(const std::string& value) { + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(std::string&& value) { + + json_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.VectorParam.json) +} +inline void VectorParam::set_json(const char* value, size_t size) { + + json_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.VectorParam.json) +} +inline std::string* VectorParam::mutable_json() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorParam.json) + return json_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* VectorParam::release_json() { + // @@protoc_insertion_point(field_release:milvus.grpc.VectorParam.json) + + return json_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorParam::set_allocated_json(std::string* json) { + if (json != nullptr) { + + } else { + + } + json_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.VectorParam.json) +} + +// repeated .milvus.grpc.RowRecord row_record = 2; +inline int VectorParam::row_record_size() const { + return row_record_.size(); +} +inline void VectorParam::clear_row_record() { + row_record_.Clear(); +} +inline ::milvus::grpc::RowRecord* VectorParam::mutable_row_record(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.VectorParam.row_record) + return row_record_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >* +VectorParam::mutable_row_record() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.VectorParam.row_record) + return &row_record_; +} +inline const ::milvus::grpc::RowRecord& VectorParam::row_record(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.VectorParam.row_record) + return row_record_.Get(index); +} +inline ::milvus::grpc::RowRecord* VectorParam::add_row_record() { + // @@protoc_insertion_point(field_add:milvus.grpc.VectorParam.row_record) + return row_record_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::RowRecord >& +VectorParam::row_record() const { + // @@protoc_insertion_point(field_list:milvus.grpc.VectorParam.row_record) + return row_record_; +} + +// ------------------------------------------------------------------- + // HSearchParam // string collection_name = 1; @@ -12265,39 +12703,270 @@ HSearchParam::mutable_partition_tag_array() { return &partition_tag_array_; } +// repeated .milvus.grpc.VectorParam vector_param = 3; +inline int HSearchParam::vector_param_size() const { + return vector_param_.size(); +} +inline void HSearchParam::clear_vector_param() { + vector_param_.Clear(); +} +inline ::milvus::grpc::VectorParam* HSearchParam::mutable_vector_param(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >* +HSearchParam::mutable_vector_param() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.vector_param) + return &vector_param_; +} +inline const ::milvus::grpc::VectorParam& HSearchParam::vector_param(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Get(index); +} +inline ::milvus::grpc::VectorParam* HSearchParam::add_vector_param() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.vector_param) + return vector_param_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::VectorParam >& +HSearchParam::vector_param() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.vector_param) + return vector_param_; +} + +// string dsl = 4; +inline void HSearchParam::clear_dsl() { + dsl_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& HSearchParam::dsl() const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.dsl) + return dsl_.GetNoArena(); +} +inline void HSearchParam::set_dsl(const std::string& value) { + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(std::string&& value) { + + dsl_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParam.dsl) +} +inline void HSearchParam::set_dsl(const char* value, size_t size) { + + dsl_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParam.dsl) +} +inline std::string* HSearchParam::mutable_dsl() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.dsl) + return dsl_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* HSearchParam::release_dsl() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParam.dsl) + + return dsl_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void HSearchParam::set_allocated_dsl(std::string* dsl) { + if (dsl != nullptr) { + + } else { + + } + dsl_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), dsl); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParam.dsl) +} + +// repeated .milvus.grpc.KeyValuePair extra_params = 5; +inline int HSearchParam::extra_params_size() const { + return extra_params_.size(); +} +inline void HSearchParam::clear_extra_params() { + extra_params_.Clear(); +} +inline ::milvus::grpc::KeyValuePair* HSearchParam::mutable_extra_params(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* +HSearchParam::mutable_extra_params() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.extra_params) + return &extra_params_; +} +inline const ::milvus::grpc::KeyValuePair& HSearchParam::extra_params(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Get(index); +} +inline ::milvus::grpc::KeyValuePair* HSearchParam::add_extra_params() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.extra_params) + return extra_params_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& +HSearchParam::extra_params() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.extra_params) + return extra_params_; +} + +// ------------------------------------------------------------------- + +// HSearchParamPB + +// string collection_name = 1; +inline void HSearchParamPB::clear_collection_name() { + collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& HSearchParamPB::collection_name() const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.collection_name) + return collection_name_.GetNoArena(); +} +inline void HSearchParamPB::set_collection_name(const std::string& value) { + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(std::string&& value) { + + collection_name_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParamPB.collection_name) +} +inline void HSearchParamPB::set_collection_name(const char* value, size_t size) { + + collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParamPB.collection_name) +} +inline std::string* HSearchParamPB::mutable_collection_name() { + + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.collection_name) + return collection_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* HSearchParamPB::release_collection_name() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParamPB.collection_name) + + return collection_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void HSearchParamPB::set_allocated_collection_name(std::string* collection_name) { + if (collection_name != nullptr) { + + } else { + + } + collection_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), collection_name); + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParamPB.collection_name) +} + +// repeated string partition_tag_array = 2; +inline int HSearchParamPB::partition_tag_array_size() const { + return partition_tag_array_.size(); +} +inline void HSearchParamPB::clear_partition_tag_array() { + partition_tag_array_.Clear(); +} +inline const std::string& HSearchParamPB::partition_tag_array(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Get(index); +} +inline std::string* HSearchParamPB::mutable_partition_tag_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Mutable(index); +} +inline void HSearchParamPB::set_partition_tag_array(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.partition_tag_array) + partition_tag_array_.Mutable(index)->assign(value); +} +inline void HSearchParamPB::set_partition_tag_array(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:milvus.grpc.HSearchParamPB.partition_tag_array) + partition_tag_array_.Mutable(index)->assign(std::move(value)); +} +inline void HSearchParamPB::set_partition_tag_array(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + partition_tag_array_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::set_partition_tag_array(int index, const char* value, size_t size) { + partition_tag_array_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline std::string* HSearchParamPB::add_partition_tag_array() { + // @@protoc_insertion_point(field_add_mutable:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_.Add(); +} +inline void HSearchParamPB::add_partition_tag_array(const std::string& value) { + partition_tag_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(std::string&& value) { + partition_tag_array_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(const char* value) { + GOOGLE_DCHECK(value != nullptr); + partition_tag_array_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline void HSearchParamPB::add_partition_tag_array(const char* value, size_t size) { + partition_tag_array_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:milvus.grpc.HSearchParamPB.partition_tag_array) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +HSearchParamPB::partition_tag_array() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParamPB.partition_tag_array) + return partition_tag_array_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +HSearchParamPB::mutable_partition_tag_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParamPB.partition_tag_array) + return &partition_tag_array_; +} + // .milvus.grpc.GeneralQuery general_query = 3; -inline bool HSearchParam::has_general_query() const { +inline bool HSearchParamPB::has_general_query() const { return this != internal_default_instance() && general_query_ != nullptr; } -inline void HSearchParam::clear_general_query() { +inline void HSearchParamPB::clear_general_query() { if (GetArenaNoVirtual() == nullptr && general_query_ != nullptr) { delete general_query_; } general_query_ = nullptr; } -inline const ::milvus::grpc::GeneralQuery& HSearchParam::general_query() const { +inline const ::milvus::grpc::GeneralQuery& HSearchParamPB::general_query() const { const ::milvus::grpc::GeneralQuery* p = general_query_; - // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.general_query) return p != nullptr ? *p : *reinterpret_cast( &::milvus::grpc::_GeneralQuery_default_instance_); } -inline ::milvus::grpc::GeneralQuery* HSearchParam::release_general_query() { - // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParam.general_query) +inline ::milvus::grpc::GeneralQuery* HSearchParamPB::release_general_query() { + // @@protoc_insertion_point(field_release:milvus.grpc.HSearchParamPB.general_query) ::milvus::grpc::GeneralQuery* temp = general_query_; general_query_ = nullptr; return temp; } -inline ::milvus::grpc::GeneralQuery* HSearchParam::mutable_general_query() { +inline ::milvus::grpc::GeneralQuery* HSearchParamPB::mutable_general_query() { if (general_query_ == nullptr) { auto* p = CreateMaybeMessage<::milvus::grpc::GeneralQuery>(GetArenaNoVirtual()); general_query_ = p; } - // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.general_query) return general_query_; } -inline void HSearchParam::set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query) { +inline void HSearchParamPB::set_allocated_general_query(::milvus::grpc::GeneralQuery* general_query) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete general_query_; @@ -12313,36 +12982,36 @@ inline void HSearchParam::set_allocated_general_query(::milvus::grpc::GeneralQue } general_query_ = general_query; - // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParam.general_query) + // @@protoc_insertion_point(field_set_allocated:milvus.grpc.HSearchParamPB.general_query) } // repeated .milvus.grpc.KeyValuePair extra_params = 4; -inline int HSearchParam::extra_params_size() const { +inline int HSearchParamPB::extra_params_size() const { return extra_params_.size(); } -inline void HSearchParam::clear_extra_params() { +inline void HSearchParamPB::clear_extra_params() { extra_params_.Clear(); } -inline ::milvus::grpc::KeyValuePair* HSearchParam::mutable_extra_params(int index) { - // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParam.extra_params) +inline ::milvus::grpc::KeyValuePair* HSearchParamPB::mutable_extra_params(int index) { + // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Mutable(index); } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >* -HSearchParam::mutable_extra_params() { - // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParam.extra_params) +HSearchParamPB::mutable_extra_params() { + // @@protoc_insertion_point(field_mutable_list:milvus.grpc.HSearchParamPB.extra_params) return &extra_params_; } -inline const ::milvus::grpc::KeyValuePair& HSearchParam::extra_params(int index) const { - // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParam.extra_params) +inline const ::milvus::grpc::KeyValuePair& HSearchParamPB::extra_params(int index) const { + // @@protoc_insertion_point(field_get:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Get(index); } -inline ::milvus::grpc::KeyValuePair* HSearchParam::add_extra_params() { - // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParam.extra_params) +inline ::milvus::grpc::KeyValuePair* HSearchParamPB::add_extra_params() { + // @@protoc_insertion_point(field_add:milvus.grpc.HSearchParamPB.extra_params) return extra_params_.Add(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::KeyValuePair >& -HSearchParam::extra_params() const { - // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParam.extra_params) +HSearchParamPB::extra_params() const { + // @@protoc_insertion_point(field_list:milvus.grpc.HSearchParamPB.extra_params) return extra_params_; } @@ -12415,7 +13084,7 @@ HSearchInSegmentsParam::mutable_segment_id_array() { return &segment_id_array_; } -// .milvus.grpc.HSearchParam search_param = 2; +// .milvus.grpc.HSearchParamPB search_param = 2; inline bool HSearchInSegmentsParam::has_search_param() const { return this != internal_default_instance() && search_param_ != nullptr; } @@ -12425,29 +13094,29 @@ inline void HSearchInSegmentsParam::clear_search_param() { } search_param_ = nullptr; } -inline const ::milvus::grpc::HSearchParam& HSearchInSegmentsParam::search_param() const { - const ::milvus::grpc::HSearchParam* p = search_param_; +inline const ::milvus::grpc::HSearchParamPB& HSearchInSegmentsParam::search_param() const { + const ::milvus::grpc::HSearchParamPB* p = search_param_; // @@protoc_insertion_point(field_get:milvus.grpc.HSearchInSegmentsParam.search_param) - return p != nullptr ? *p : *reinterpret_cast( - &::milvus::grpc::_HSearchParam_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &::milvus::grpc::_HSearchParamPB_default_instance_); } -inline ::milvus::grpc::HSearchParam* HSearchInSegmentsParam::release_search_param() { +inline ::milvus::grpc::HSearchParamPB* HSearchInSegmentsParam::release_search_param() { // @@protoc_insertion_point(field_release:milvus.grpc.HSearchInSegmentsParam.search_param) - ::milvus::grpc::HSearchParam* temp = search_param_; + ::milvus::grpc::HSearchParamPB* temp = search_param_; search_param_ = nullptr; return temp; } -inline ::milvus::grpc::HSearchParam* HSearchInSegmentsParam::mutable_search_param() { +inline ::milvus::grpc::HSearchParamPB* HSearchInSegmentsParam::mutable_search_param() { if (search_param_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::grpc::HSearchParam>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage<::milvus::grpc::HSearchParamPB>(GetArenaNoVirtual()); search_param_ = p; } // @@protoc_insertion_point(field_mutable:milvus.grpc.HSearchInSegmentsParam.search_param) return search_param_; } -inline void HSearchInSegmentsParam::set_allocated_search_param(::milvus::grpc::HSearchParam* search_param) { +inline void HSearchInSegmentsParam::set_allocated_search_param(::milvus::grpc::HSearchParamPB* search_param) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete search_param_; @@ -13795,6 +14464,10 @@ HIndexParam::extra_params() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/sdk/grpc/ClientProxy.cpp b/sdk/grpc/ClientProxy.cpp index d96c2887..50e8f87b 100644 --- a/sdk/grpc/ClientProxy.cpp +++ b/sdk/grpc/ClientProxy.cpp @@ -784,12 +784,12 @@ WriteQueryToProto(::milvus::grpc::GeneralQuery* general_query, BooleanQueryPtr b } Status -ClientProxy::HybridSearch(const std::string& collection_name, const std::vector& partition_list, - BooleanQueryPtr& boolean_query, const std::string& extra_params, - TopKHybridQueryResult& topk_query_result) { +ClientProxy::HybridSearchPB(const std::string& collection_name, const std::vector& partition_list, + BooleanQueryPtr& boolean_query, const std::string& extra_params, + TopKHybridQueryResult& topk_query_result) { try { // convert boolean_query to proto - ::milvus::grpc::HSearchParam search_param; + ::milvus::grpc::HSearchParamPB search_param; search_param.set_collection_name(collection_name); for (auto partition : partition_list) { auto value = search_param.add_partition_tag_array(); @@ -804,7 +804,7 @@ ClientProxy::HybridSearch(const std::string& collection_name, const std::vector< // step 2: search vectors ::milvus::grpc::HQueryResult result; - Status status = client_ptr_->HybridSearch(search_param, result); + Status status = client_ptr_->HybridSearchPB(search_param, result); // step 3: convert result array ConstructTopkHybridResult(result, topk_query_result); @@ -814,6 +814,34 @@ ClientProxy::HybridSearch(const std::string& collection_name, const std::vector< } } +Status +ClientProxy::HybridSearch(const std::string& collection_name, const std::vector& partition_list, + const std::string& dsl, const std::string& vector_param, + const std::vector& entity_array, milvus::TopKHybridQueryResult& topk_query_result) { + try { + ::milvus::grpc::HSearchParam search_param; + search_param.set_collection_name(collection_name); + for (auto partition : partition_list) { + auto value = search_param.add_partition_tag_array(); + *value = partition; + } + search_param.set_dsl(dsl); + auto grpc_vector_param = search_param.add_vector_param(); + grpc_vector_param->set_json(vector_param); + for (auto& entity : entity_array) { + auto row_record = grpc_vector_param->add_row_record(); + CopyRowRecord(row_record, entity); + } + + ::milvus::grpc::HQueryResult result; + Status status = client_ptr_->HybridSearch(search_param, result); + ConstructTopkHybridResult(result, topk_query_result); + return status; + } catch (std::exception& ex) { + return Status(StatusCode::UnknownError, "Failed to search entities: " + std::string(ex.what())); + } +} + Status ClientProxy::GetHEntityByID(const std::string& collection_name, const std::vector& id_array, milvus::HybridQueryResult& result) { diff --git a/sdk/grpc/ClientProxy.h b/sdk/grpc/ClientProxy.h index 74af4515..0f31b6be 100644 --- a/sdk/grpc/ClientProxy.h +++ b/sdk/grpc/ClientProxy.h @@ -67,8 +67,7 @@ class ClientProxy : public Connection { const std::vector& entity_array, std::vector& id_array) override; Status - GetEntityByID(const std::string& collection_name, - const std::vector& id_array, + GetEntityByID(const std::string& collection_name, const std::vector& id_array, std::vector& entities_data) override; Status @@ -131,10 +130,15 @@ class ClientProxy : public Connection { InsertEntity(const std::string& collection_name, const std::string& partition_tag, HEntity& entities, std::vector& id_array) override; + Status + HybridSearchPB(const std::string& collection_name, const std::vector& partition_list, + BooleanQueryPtr& boolean_query, const std::string& extra_params, + TopKHybridQueryResult& topk_query_result) override; + Status HybridSearch(const std::string& collection_name, const std::vector& partition_list, - BooleanQueryPtr& boolean_query, const std::string& extra_params, - TopKHybridQueryResult& topk_query_result) override; + const std::string& dsl, const std::string& vector_param, const std::vector& entity_array, + TopKHybridQueryResult& query_result) override; Status GetHEntityByID(const std::string& collection_name, const std::vector& id_array, diff --git a/sdk/grpc/GrpcClient.cpp b/sdk/grpc/GrpcClient.cpp index d2881ddf..804ab5e9 100644 --- a/sdk/grpc/GrpcClient.cpp +++ b/sdk/grpc/GrpcClient.cpp @@ -508,6 +508,23 @@ GrpcClient::InsertEntities(milvus::grpc::HInsertParam& entities, milvus::grpc::H return Status::OK(); } +Status +GrpcClient::HybridSearchPB(milvus::grpc::HSearchParamPB& search_param, milvus::grpc::HQueryResult& result) { + ClientContext context; + ::grpc::Status grpc_status = stub_->HybridSearchPB(&context, search_param, &result); + + if (!grpc_status.ok()) { + std::cerr << "HybridSearchPB gRPC failed!" << std::endl; + return Status(StatusCode::RPCFailed, grpc_status.error_message()); + } + + if (result.status().error_code() != grpc::SUCCESS) { + std::cerr << result.status().reason() << std::endl; + return Status(StatusCode::ServerFailed, result.status().reason()); + } + return Status::OK(); +} + Status GrpcClient::HybridSearch(milvus::grpc::HSearchParam& search_param, milvus::grpc::HQueryResult& result) { ClientContext context; diff --git a/sdk/grpc/GrpcClient.h b/sdk/grpc/GrpcClient.h index edb7bd38..8cea3b9d 100644 --- a/sdk/grpc/GrpcClient.h +++ b/sdk/grpc/GrpcClient.h @@ -114,6 +114,9 @@ class GrpcClient { Status InsertEntities(milvus::grpc::HInsertParam& entities, milvus::grpc::HEntityIDs& ids); + Status + HybridSearchPB(milvus::grpc::HSearchParamPB& search_param, milvus::grpc::HQueryResult& result); + Status HybridSearch(milvus::grpc::HSearchParam& search_param, milvus::grpc::HQueryResult& result); diff --git a/sdk/include/MilvusApi.h b/sdk/include/MilvusApi.h index 32aae361..e93747db 100644 --- a/sdk/include/MilvusApi.h +++ b/sdk/include/MilvusApi.h @@ -356,8 +356,7 @@ class Connection { * @return Indicate if the operation is succeed. */ virtual Status - GetEntityByID(const std::string& collection_name, - const std::vector& id_array, + GetEntityByID(const std::string& collection_name, const std::vector& id_array, std::vector& entities_data) = 0; /** @@ -373,8 +372,7 @@ class Connection { * @return Indicate if the operation is succeed. */ virtual Status - ListIDInSegment(const std::string& collection_name, - const std::string& segment_name, + ListIDInSegment(const std::string& collection_name, const std::string& segment_name, std::vector& id_array) = 0; /** @@ -588,9 +586,14 @@ class Connection { InsertEntity(const std::string& collection_name, const std::string& partition_tag, HEntity& entities, std::vector& id_array) = 0; + virtual Status + HybridSearchPB(const std::string& collection_name, const std::vector& partition_list, + BooleanQueryPtr& boolean_query, const std::string& extra_params, + TopKHybridQueryResult& query_result) = 0; + virtual Status HybridSearch(const std::string& collection_name, const std::vector& partition_list, - BooleanQueryPtr& boolean_query, const std::string& extra_params, + const std::string& dsl, const std::string& vector_param, const std::vector& entity_array, TopKHybridQueryResult& query_result) = 0; virtual Status diff --git a/sdk/interface/ConnectionImpl.cpp b/sdk/interface/ConnectionImpl.cpp index d5a69489..50c912e0 100644 --- a/sdk/interface/ConnectionImpl.cpp +++ b/sdk/interface/ConnectionImpl.cpp @@ -103,8 +103,7 @@ ConnectionImpl::Insert(const std::string& collection_name, const std::string& pa } Status -ConnectionImpl::GetEntityByID(const std::string& collection_name, - const std::vector& id_array, +ConnectionImpl::GetEntityByID(const std::string& collection_name, const std::vector& id_array, std::vector& entities_data) { return client_proxy_->GetEntityByID(collection_name, id_array, entities_data); } @@ -206,11 +205,19 @@ ConnectionImpl::InsertEntity(const std::string& collection_name, const std::stri return client_proxy_->InsertEntity(collection_name, partition_tag, entities, id_array); } +Status +ConnectionImpl::HybridSearchPB(const std::string& collection_name, const std::vector& partition_list, + BooleanQueryPtr& boolean_query, const std::string& extra_params, + TopKHybridQueryResult& topk_query_result) { + return client_proxy_->HybridSearchPB(collection_name, partition_list, boolean_query, extra_params, + topk_query_result); +} + Status ConnectionImpl::HybridSearch(const std::string& collection_name, const std::vector& partition_list, - BooleanQueryPtr& boolean_query, const std::string& extra_params, - TopKHybridQueryResult& topk_query_result) { - return client_proxy_->HybridSearch(collection_name, partition_list, boolean_query, extra_params, topk_query_result); + const std::string& dsl, const std::string& vector_param, + const std::vector& entity_array, milvus::TopKHybridQueryResult& query_result) { + return client_proxy_->HybridSearch(collection_name, partition_list, dsl, vector_param, entity_array, query_result); } Status diff --git a/sdk/interface/ConnectionImpl.h b/sdk/interface/ConnectionImpl.h index 78ceaa56..6f8d14df 100644 --- a/sdk/interface/ConnectionImpl.h +++ b/sdk/interface/ConnectionImpl.h @@ -69,8 +69,7 @@ class ConnectionImpl : public Connection { const std::vector& entity_array, std::vector& id_array) override; Status - GetEntityByID(const std::string& collection_name, - const std::vector& id_array, + GetEntityByID(const std::string& collection_name, const std::vector& id_array, std::vector& entities_data) override; Status @@ -133,10 +132,15 @@ class ConnectionImpl : public Connection { InsertEntity(const std::string& collection_name, const std::string& partition_tag, HEntity& entities, std::vector& id_array) override; + Status + HybridSearchPB(const std::string& collection_name, const std::vector& partition_list, + BooleanQueryPtr& boolean_query, const std::string& extra_params, + TopKHybridQueryResult& topk_query_result) override; + Status HybridSearch(const std::string& collection_name, const std::vector& partition_list, - BooleanQueryPtr& boolean_query, const std::string& extra_params, - TopKHybridQueryResult& topk_query_result) override; + const std::string& dsl, const std::string& vector_param, const std::vector& entity_array, + TopKHybridQueryResult& query_result) override; Status GetHEntityByID(const std::string& collection_name, const std::vector& id_array, -- GitLab