mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
Add new hybrid search api (#2445)
* Add json-string-dsl hybrid search api Signed-off-by: fishpenguin <kun.yu@zilliz.com> * Add C++ sdk for json-string-dsl hybrid search Signed-off-by: fishpenguin <kun.yu@zilliz.com> * Add C++ examples for new hybrid search api Signed-off-by: fishpenguin <kun.yu@zilliz.com> * Add unittest for new hybrid search api Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
parent
353eb5e824
commit
2264aab084
@ -168,8 +168,8 @@ class DB {
|
||||
|
||||
virtual Status
|
||||
HybridQuery(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
|
||||
const std::vector<std::string>& partition_tags, context::HybridSearchContextPtr hybrid_search_context,
|
||||
query::GeneralQueryPtr general_query, std::vector<std::string>& field_name,
|
||||
const std::vector<std::string>& partition_tags, query::GeneralQueryPtr general_query,
|
||||
query::QueryPtr query_ptr, std::vector<std::string>& field_name,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& attr_type,
|
||||
engine::QueryResult& result) = 0;
|
||||
}; // DB
|
||||
|
||||
@ -1783,9 +1783,8 @@ DBImpl::QueryByIDs(const std::shared_ptr<server::Context>& context, const std::s
|
||||
|
||||
Status
|
||||
DBImpl::HybridQuery(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
|
||||
const std::vector<std::string>& partition_tags,
|
||||
context::HybridSearchContextPtr hybrid_search_context, query::GeneralQueryPtr general_query,
|
||||
std::vector<std::string>& field_names,
|
||||
const std::vector<std::string>& partition_tags, query::GeneralQueryPtr general_query,
|
||||
query::QueryPtr query_ptr, std::vector<std::string>& field_names,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& attr_type,
|
||||
engine::QueryResult& result) {
|
||||
auto query_ctx = context->Child("Query");
|
||||
@ -1837,8 +1836,8 @@ DBImpl::HybridQuery(const std::shared_ptr<server::Context>& 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<server::Context>& context, meta::FilesH
|
||||
|
||||
Status
|
||||
DBImpl::HybridQueryAsync(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
|
||||
meta::FilesHolder& files_holder, context::HybridSearchContextPtr hybrid_search_context,
|
||||
query::GeneralQueryPtr general_query, std::vector<std::string>& field_names,
|
||||
meta::FilesHolder& files_holder, query::GeneralQueryPtr general_query,
|
||||
query::QueryPtr query_ptr, std::vector<std::string>& field_names,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& attr_type,
|
||||
engine::QueryResult& result) {
|
||||
auto query_async_ctx = context->Child("Query Async");
|
||||
@ -2030,7 +2029,7 @@ DBImpl::HybridQueryAsync(const std::shared_ptr<server::Context>& 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<scheduler::SearchJob>(query_async_ctx, general_query, attr_type, vectors);
|
||||
std::make_shared<scheduler::SearchJob>(query_async_ctx, general_query, query_ptr, attr_type, vectors);
|
||||
for (auto& file : files) {
|
||||
scheduler::SegmentSchemaPtr file_ptr = std::make_shared<meta::SegmentSchema>(file);
|
||||
job->AddIndexFile(file_ptr);
|
||||
|
||||
@ -160,8 +160,8 @@ class DBImpl : public DB, public server::CacheConfigHandler, public server::Engi
|
||||
|
||||
Status
|
||||
HybridQuery(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
|
||||
const std::vector<std::string>& partition_tags, context::HybridSearchContextPtr hybrid_search_context,
|
||||
query::GeneralQueryPtr general_query, std::vector<std::string>& field_names,
|
||||
const std::vector<std::string>& partition_tags, query::GeneralQueryPtr general_query,
|
||||
query::QueryPtr query_ptr, std::vector<std::string>& field_names,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& 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<server::Context>& context, const std::string& collection_id,
|
||||
meta::FilesHolder& files_holder, context::HybridSearchContextPtr hybrid_search_context,
|
||||
query::GeneralQueryPtr general_query, std::vector<std::string>& field_names,
|
||||
meta::FilesHolder& files_holder, query::GeneralQueryPtr general_query, query::QueryPtr query_ptr,
|
||||
std::vector<std::string>& field_names,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& attr_type,
|
||||
engine::QueryResult& result);
|
||||
|
||||
|
||||
@ -117,12 +117,11 @@ class ExecutionEngine {
|
||||
|
||||
virtual Status
|
||||
ExecBinaryQuery(query::GeneralQueryPtr general_query, faiss::ConcurrentBitsetPtr& bitset,
|
||||
std::unordered_map<std::string, DataType>& attr_type,
|
||||
milvus::query::VectorQueryPtr& vector_query) = 0;
|
||||
std::unordered_map<std::string, DataType>& attr_type, std::string& vector_placeholder) = 0;
|
||||
|
||||
virtual Status
|
||||
HybridSearch(query::GeneralQueryPtr general_query, std::unordered_map<std::string, DataType>& attr_type,
|
||||
uint64_t& nq, uint64_t& topk, std::vector<float>& distances, std::vector<int64_t>& search_ids) = 0;
|
||||
query::QueryPtr query_ptr, std::vector<float>& distances, std::vector<int64_t>& 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,
|
||||
|
||||
@ -787,12 +787,15 @@ ExecutionEngineImpl::ProcessRangeQuery(std::vector<T> data, T value, query::Comp
|
||||
}
|
||||
|
||||
Status
|
||||
ExecutionEngineImpl::HybridSearch(milvus::query::GeneralQueryPtr general_query,
|
||||
std::unordered_map<std::string, DataType>& attr_type, uint64_t& nq, uint64_t& topk,
|
||||
ExecutionEngineImpl::HybridSearch(query::GeneralQueryPtr general_query,
|
||||
std::unordered_map<std::string, DataType>& attr_type, query::QueryPtr query_ptr,
|
||||
std::vector<float>& distances, std::vector<int64_t>& 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<std::string, DataType>& 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();
|
||||
}
|
||||
|
||||
@ -71,13 +71,11 @@ class ExecutionEngineImpl : public ExecutionEngine {
|
||||
|
||||
Status
|
||||
ExecBinaryQuery(query::GeneralQueryPtr general_query, faiss::ConcurrentBitsetPtr& bitset,
|
||||
std::unordered_map<std::string, DataType>& attr_type,
|
||||
milvus::query::VectorQueryPtr& vector_query) override;
|
||||
std::unordered_map<std::string, DataType>& attr_type, std::string& vector_placeholder) override;
|
||||
|
||||
Status
|
||||
HybridSearch(query::GeneralQueryPtr general_query, std::unordered_map<std::string, DataType>& attr_type,
|
||||
uint64_t& nq, uint64_t& topk, std::vector<float>& distances,
|
||||
std::vector<int64_t>& search_ids) override;
|
||||
query::QueryPtr query_ptr, std::vector<float>& distances, std::vector<int64_t>& search_ids) override;
|
||||
|
||||
Status
|
||||
Search(int64_t n, const float* data, int64_t k, const milvus::json& extra_params, float* distances, int64_t* labels,
|
||||
|
||||
@ -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<void(::grpc::Status)> 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<void(::grpc::Status)> 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;
|
||||
|
||||
@ -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<void(::grpc::Status)>) = 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<void(::grpc::Status)>) = 0;
|
||||
virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) = 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<void(::grpc::Status)>) = 0;
|
||||
virtual void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) = 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<void(::grpc::Status)>) 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<void(::grpc::Status)>) override;
|
||||
void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) 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<void(::grpc::Status)>) override;
|
||||
void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) 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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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<WithAsyncMethod_HasCollection<WithAsyncMethod_DescribeCollection<WithAsyncMethod_CountCollection<WithAsyncMethod_ShowCollections<WithAsyncMethod_ShowCollectionInfo<WithAsyncMethod_DropCollection<WithAsyncMethod_CreateIndex<WithAsyncMethod_DescribeIndex<WithAsyncMethod_DropIndex<WithAsyncMethod_CreatePartition<WithAsyncMethod_HasPartition<WithAsyncMethod_ShowPartitions<WithAsyncMethod_DropPartition<WithAsyncMethod_Insert<WithAsyncMethod_GetVectorsByID<WithAsyncMethod_GetVectorIDs<WithAsyncMethod_Search<WithAsyncMethod_SearchByID<WithAsyncMethod_SearchInFiles<WithAsyncMethod_Cmd<WithAsyncMethod_DeleteByID<WithAsyncMethod_PreloadCollection<WithAsyncMethod_Flush<WithAsyncMethod_Compact<WithAsyncMethod_CreateHybridCollection<WithAsyncMethod_HasHybridCollection<WithAsyncMethod_DropHybridCollection<WithAsyncMethod_DescribeHybridCollection<WithAsyncMethod_CountHybridCollection<WithAsyncMethod_ShowHybridCollections<WithAsyncMethod_ShowHybridCollectionInfo<WithAsyncMethod_PreloadHybridCollection<WithAsyncMethod_InsertEntity<WithAsyncMethod_HybridSearch<WithAsyncMethod_HybridSearchInSegments<WithAsyncMethod_GetEntityByID<WithAsyncMethod_GetEntityIDs<WithAsyncMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
|
||||
typedef WithAsyncMethod_CreateCollection<WithAsyncMethod_HasCollection<WithAsyncMethod_DescribeCollection<WithAsyncMethod_CountCollection<WithAsyncMethod_ShowCollections<WithAsyncMethod_ShowCollectionInfo<WithAsyncMethod_DropCollection<WithAsyncMethod_CreateIndex<WithAsyncMethod_DescribeIndex<WithAsyncMethod_DropIndex<WithAsyncMethod_CreatePartition<WithAsyncMethod_HasPartition<WithAsyncMethod_ShowPartitions<WithAsyncMethod_DropPartition<WithAsyncMethod_Insert<WithAsyncMethod_GetVectorsByID<WithAsyncMethod_GetVectorIDs<WithAsyncMethod_Search<WithAsyncMethod_SearchByID<WithAsyncMethod_SearchInFiles<WithAsyncMethod_Cmd<WithAsyncMethod_DeleteByID<WithAsyncMethod_PreloadCollection<WithAsyncMethod_Flush<WithAsyncMethod_Compact<WithAsyncMethod_CreateHybridCollection<WithAsyncMethod_HasHybridCollection<WithAsyncMethod_DropHybridCollection<WithAsyncMethod_DescribeHybridCollection<WithAsyncMethod_CountHybridCollection<WithAsyncMethod_ShowHybridCollections<WithAsyncMethod_ShowHybridCollectionInfo<WithAsyncMethod_PreloadHybridCollection<WithAsyncMethod_InsertEntity<WithAsyncMethod_HybridSearchPB<WithAsyncMethod_HybridSearch<WithAsyncMethod_HybridSearchInSegments<WithAsyncMethod_GetEntityByID<WithAsyncMethod_GetEntityIDs<WithAsyncMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
|
||||
template <class BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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<ExperimentalWithCallbackMethod_HasCollection<ExperimentalWithCallbackMethod_DescribeCollection<ExperimentalWithCallbackMethod_CountCollection<ExperimentalWithCallbackMethod_ShowCollections<ExperimentalWithCallbackMethod_ShowCollectionInfo<ExperimentalWithCallbackMethod_DropCollection<ExperimentalWithCallbackMethod_CreateIndex<ExperimentalWithCallbackMethod_DescribeIndex<ExperimentalWithCallbackMethod_DropIndex<ExperimentalWithCallbackMethod_CreatePartition<ExperimentalWithCallbackMethod_HasPartition<ExperimentalWithCallbackMethod_ShowPartitions<ExperimentalWithCallbackMethod_DropPartition<ExperimentalWithCallbackMethod_Insert<ExperimentalWithCallbackMethod_GetVectorsByID<ExperimentalWithCallbackMethod_GetVectorIDs<ExperimentalWithCallbackMethod_Search<ExperimentalWithCallbackMethod_SearchByID<ExperimentalWithCallbackMethod_SearchInFiles<ExperimentalWithCallbackMethod_Cmd<ExperimentalWithCallbackMethod_DeleteByID<ExperimentalWithCallbackMethod_PreloadCollection<ExperimentalWithCallbackMethod_Flush<ExperimentalWithCallbackMethod_Compact<ExperimentalWithCallbackMethod_CreateHybridCollection<ExperimentalWithCallbackMethod_HasHybridCollection<ExperimentalWithCallbackMethod_DropHybridCollection<ExperimentalWithCallbackMethod_DescribeHybridCollection<ExperimentalWithCallbackMethod_CountHybridCollection<ExperimentalWithCallbackMethod_ShowHybridCollections<ExperimentalWithCallbackMethod_ShowHybridCollectionInfo<ExperimentalWithCallbackMethod_PreloadHybridCollection<ExperimentalWithCallbackMethod_InsertEntity<ExperimentalWithCallbackMethod_HybridSearch<ExperimentalWithCallbackMethod_HybridSearchInSegments<ExperimentalWithCallbackMethod_GetEntityByID<ExperimentalWithCallbackMethod_GetEntityIDs<ExperimentalWithCallbackMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService;
|
||||
typedef ExperimentalWithCallbackMethod_CreateCollection<ExperimentalWithCallbackMethod_HasCollection<ExperimentalWithCallbackMethod_DescribeCollection<ExperimentalWithCallbackMethod_CountCollection<ExperimentalWithCallbackMethod_ShowCollections<ExperimentalWithCallbackMethod_ShowCollectionInfo<ExperimentalWithCallbackMethod_DropCollection<ExperimentalWithCallbackMethod_CreateIndex<ExperimentalWithCallbackMethod_DescribeIndex<ExperimentalWithCallbackMethod_DropIndex<ExperimentalWithCallbackMethod_CreatePartition<ExperimentalWithCallbackMethod_HasPartition<ExperimentalWithCallbackMethod_ShowPartitions<ExperimentalWithCallbackMethod_DropPartition<ExperimentalWithCallbackMethod_Insert<ExperimentalWithCallbackMethod_GetVectorsByID<ExperimentalWithCallbackMethod_GetVectorIDs<ExperimentalWithCallbackMethod_Search<ExperimentalWithCallbackMethod_SearchByID<ExperimentalWithCallbackMethod_SearchInFiles<ExperimentalWithCallbackMethod_Cmd<ExperimentalWithCallbackMethod_DeleteByID<ExperimentalWithCallbackMethod_PreloadCollection<ExperimentalWithCallbackMethod_Flush<ExperimentalWithCallbackMethod_Compact<ExperimentalWithCallbackMethod_CreateHybridCollection<ExperimentalWithCallbackMethod_HasHybridCollection<ExperimentalWithCallbackMethod_DropHybridCollection<ExperimentalWithCallbackMethod_DescribeHybridCollection<ExperimentalWithCallbackMethod_CountHybridCollection<ExperimentalWithCallbackMethod_ShowHybridCollections<ExperimentalWithCallbackMethod_ShowHybridCollectionInfo<ExperimentalWithCallbackMethod_PreloadHybridCollection<ExperimentalWithCallbackMethod_InsertEntity<ExperimentalWithCallbackMethod_HybridSearchPB<ExperimentalWithCallbackMethod_HybridSearch<ExperimentalWithCallbackMethod_HybridSearchInSegments<ExperimentalWithCallbackMethod_GetEntityByID<ExperimentalWithCallbackMethod_GetEntityIDs<ExperimentalWithCallbackMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_CreateCollection : public BaseClass {
|
||||
private:
|
||||
@ -4227,12 +4306,29 @@ class MilvusService final {
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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<BaseClass>::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 BaseClass>
|
||||
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<BaseClass>::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<BaseClass>::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<BaseClass>::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<BaseClass>::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<BaseClass>::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<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearchPB<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearchPB<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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) {}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include "utils/Json.h"
|
||||
|
||||
@ -92,7 +93,7 @@ using GeneralQueryPtr = std::shared_ptr<GeneralQuery>;
|
||||
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<std::string, VectorQueryPtr> vectors;
|
||||
};
|
||||
using QueryPtr = std::shared_ptr<Query>;
|
||||
|
||||
} // namespace query
|
||||
} // namespace milvus
|
||||
|
||||
@ -22,9 +22,15 @@ SearchJob::SearchJob(const std::shared_ptr<server::Context>& context, uint64_t t
|
||||
}
|
||||
|
||||
SearchJob::SearchJob(const std::shared_ptr<server::Context>& context, milvus::query::GeneralQueryPtr general_query,
|
||||
query::QueryPtr query_ptr,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& 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
|
||||
|
||||
@ -46,7 +46,7 @@ class SearchJob : public Job {
|
||||
const engine::VectorsData& vectors);
|
||||
|
||||
SearchJob(const std::shared_ptr<server::Context>& context, query::GeneralQueryPtr general_query,
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType>& attr_type,
|
||||
query::QueryPtr query_ptr, std::unordered_map<std::string, engine::meta::hybrid::DataType>& 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<std::string, engine::meta::hybrid::DataType>&
|
||||
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<std::string, engine::meta::hybrid::DataType> attr_type_;
|
||||
uint64_t vector_count_;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -316,14 +316,12 @@ RequestHandler::GetEntityByID(const std::shared_ptr<Context>& context, const std
|
||||
}
|
||||
|
||||
Status
|
||||
RequestHandler::HybridSearch(const std::shared_ptr<Context>& context,
|
||||
context::HybridSearchContextPtr hybrid_search_context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, milvus::query::GeneralQueryPtr& general_query,
|
||||
milvus::json& json_params, std::vector<std::string>& 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>& context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, query::GeneralQueryPtr& general_query,
|
||||
query::QueryPtr& query_ptr, milvus::json& json_params,
|
||||
std::vector<std::string>& 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);
|
||||
|
||||
|
||||
@ -146,10 +146,10 @@ class RequestHandler {
|
||||
std::vector<engine::VectorsData>& vectors);
|
||||
|
||||
Status
|
||||
HybridSearch(const std::shared_ptr<Context>& context, context::HybridSearchContextPtr hybrid_search_context,
|
||||
const std::string& collection_name, std::vector<std::string>& partition_list,
|
||||
query::GeneralQueryPtr& general_query, milvus::json& json_params,
|
||||
std::vector<std::string>& field_names, engine::QueryResult& result);
|
||||
HybridSearch(const std::shared_ptr<Context>& context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, query::GeneralQueryPtr& general_query,
|
||||
query::QueryPtr& query_ptr, milvus::json& json_params, std::vector<std::string>& field_names,
|
||||
engine::QueryResult& result);
|
||||
};
|
||||
|
||||
} // namespace server
|
||||
|
||||
@ -31,28 +31,26 @@ namespace milvus {
|
||||
namespace server {
|
||||
|
||||
HybridSearchRequest::HybridSearchRequest(const std::shared_ptr<milvus::server::Context>& context,
|
||||
context::HybridSearchContextPtr& hybrid_search_context,
|
||||
const std::string& collection_name, std::vector<std::string>& partition_list,
|
||||
milvus::query::GeneralQueryPtr& general_query, milvus::json& json_params,
|
||||
std::vector<std::string>& field_names, engine::QueryResult& result)
|
||||
query::GeneralQueryPtr& general_query, query::QueryPtr& query_ptr,
|
||||
milvus::json& json_params, std::vector<std::string>& 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<milvus::server::Context>& context,
|
||||
context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, milvus::query::GeneralQueryPtr& general_query,
|
||||
milvus::json& json_params, std::vector<std::string>& field_names,
|
||||
engine::QueryResult& result) {
|
||||
return std::shared_ptr<BaseRequest>(new HybridSearchRequest(context, hybrid_search_context, collection_name,
|
||||
partition_list, general_query, json_params, field_names,
|
||||
result));
|
||||
HybridSearchRequest::Create(const std::shared_ptr<milvus::server::Context>& context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, query::GeneralQueryPtr& general_query,
|
||||
query::QueryPtr& query_ptr, milvus::json& json_params,
|
||||
std::vector<std::string>& field_names, engine::QueryResult& result) {
|
||||
return std::shared_ptr<BaseRequest>(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();
|
||||
|
||||
@ -24,25 +24,24 @@ namespace server {
|
||||
class HybridSearchRequest : public BaseRequest {
|
||||
public:
|
||||
static BaseRequestPtr
|
||||
Create(const std::shared_ptr<milvus::server::Context>& context,
|
||||
context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, milvus::query::GeneralQueryPtr& general_query,
|
||||
Create(const std::shared_ptr<milvus::server::Context>& context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, query::GeneralQueryPtr& general_query, query::QueryPtr& query_ptr,
|
||||
milvus::json& json_params, std::vector<std::string>& field_names, engine::QueryResult& result);
|
||||
|
||||
protected:
|
||||
HybridSearchRequest(const std::shared_ptr<milvus::server::Context>& context,
|
||||
context::HybridSearchContextPtr& hybrid_search_context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, milvus::query::GeneralQueryPtr& general_query,
|
||||
milvus::json& json_params, std::vector<std::string>& field_names, engine::QueryResult& result);
|
||||
HybridSearchRequest(const std::shared_ptr<milvus::server::Context>& context, const std::string& collection_name,
|
||||
std::vector<std::string>& partition_list, query::GeneralQueryPtr& general_query,
|
||||
query::QueryPtr& query_ptr, milvus::json& json_params, std::vector<std::string>& field_names,
|
||||
engine::QueryResult& result);
|
||||
|
||||
Status
|
||||
OnExecute() override;
|
||||
|
||||
private:
|
||||
context::HybridSearchContextPtr hybrid_search_context_;
|
||||
const std::string collection_name_;
|
||||
std::vector<std::string> partition_list_;
|
||||
milvus::query::GeneralQueryPtr general_query_;
|
||||
milvus::query::QueryPtr query_ptr_;
|
||||
milvus::json json_params;
|
||||
std::vector<std::string>& field_names_;
|
||||
engine::QueryResult& result_;
|
||||
|
||||
@ -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<query::BooleanQuery>();
|
||||
DeSerialization(general_query.boolean_query().general_query(i), query, query_ptr);
|
||||
boolean_clause->AddBooleanQuery(query);
|
||||
} else {
|
||||
auto leaf_query = std::make_shared<query::LeafQuery>();
|
||||
auto query = general_query.boolean_query().general_query(i);
|
||||
if (query.has_term_query()) {
|
||||
query::TermQueryPtr term_query = std::make_shared<query::TermQuery>();
|
||||
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<query::RangeQuery>();
|
||||
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<query::VectorQuery>();
|
||||
|
||||
engine::VectorsData vectors;
|
||||
CopyRowRecords(query.vector_query().records(),
|
||||
google::protobuf::RepeatedField<google::protobuf::int64>(), 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,91 +1199,17 @@ 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<query::BooleanQuery>();
|
||||
DeSerialization(general_query.boolean_query().general_query(i), query);
|
||||
boolean_clause->AddBooleanQuery(query);
|
||||
} else {
|
||||
auto leaf_query = std::make_shared<query::LeafQuery>();
|
||||
auto query = general_query.boolean_query().general_query(i);
|
||||
if (query.has_term_query()) {
|
||||
query::TermQueryPtr term_query = std::make_shared<query::TermQuery>();
|
||||
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<query::RangeQuery>();
|
||||
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<query::VectorQuery>();
|
||||
|
||||
engine::VectorsData vectors;
|
||||
CopyRowRecords(query.vector_query().records(),
|
||||
google::protobuf::RepeatedField<google::protobuf::int64>(), 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;
|
||||
leaf_query->vector_query = vector_query;
|
||||
boolean_clause->AddLeafQuery(leaf_query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::grpc::Status
|
||||
GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request,
|
||||
::milvus::grpc::HQueryResult* response) {
|
||||
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__);
|
||||
|
||||
context::HybridSearchContextPtr hybrid_search_context = std::make_shared<context::HybridSearchContext>();
|
||||
auto boolean_query = std::make_shared<query::BooleanQuery>();
|
||||
auto query_ptr = std::make_shared<query::Query>();
|
||||
DeSerialization(request->general_query(), boolean_query, query_ptr);
|
||||
|
||||
query::BooleanQueryPtr boolean_query = std::make_shared<query::BooleanQuery>();
|
||||
DeSerialization(request->general_query(), boolean_query);
|
||||
|
||||
query::GeneralQueryPtr general_query = std::make_shared<query::GeneralQuery>();
|
||||
auto general_query = std::make_shared<query::GeneralQuery>();
|
||||
query::GenBinaryQuery(boolean_query, general_query->bin);
|
||||
|
||||
Status status;
|
||||
@ -1215,8 +1220,6 @@ GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus:
|
||||
return ::grpc::Status::OK;
|
||||
}
|
||||
|
||||
hybrid_search_context->general_query_ = general_query;
|
||||
|
||||
std::vector<std::string> partition_list;
|
||||
partition_list.resize(request->partition_tag_array_size());
|
||||
for (uint64_t i = 0; i < request->partition_tag_array_size(); ++i) {
|
||||
@ -1233,8 +1236,336 @@ GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus:
|
||||
|
||||
engine::QueryResult result;
|
||||
std::vector<std::string> 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_);
|
||||
auto grpc_entity = response->mutable_entity();
|
||||
ConstructHEntityResults(result.attrs_, result.vectors_, field_names, grpc_entity);
|
||||
grpc_entity->mutable_entity_id()->Resize(static_cast<int>(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<int>(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<std::string, engine::meta::hybrid::DataType> field_type,
|
||||
query::TermQueryPtr& term_query) {
|
||||
std::string field_name = term_json["field_name"].get<std::string>();
|
||||
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<int64_t> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; i++) {
|
||||
term_value[i] = term_value_json[i].get<int8_t>();
|
||||
}
|
||||
memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t));
|
||||
break;
|
||||
}
|
||||
case engine::meta::hybrid::DataType::INT16: {
|
||||
std::vector<int64_t> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; i++) {
|
||||
term_value[i] = term_value_json[i].get<int16_t>();
|
||||
}
|
||||
memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t));
|
||||
break;
|
||||
}
|
||||
case engine::meta::hybrid::DataType::INT32: {
|
||||
std::vector<int64_t> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; i++) {
|
||||
term_value[i] = term_value_json[i].get<int32_t>();
|
||||
}
|
||||
memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t));
|
||||
break;
|
||||
}
|
||||
case engine::meta::hybrid::DataType::INT64: {
|
||||
std::vector<int64_t> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; ++i) {
|
||||
term_value[i] = term_value_json[i].get<int64_t>();
|
||||
}
|
||||
memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(int64_t));
|
||||
break;
|
||||
}
|
||||
case engine::meta::hybrid::DataType::FLOAT: {
|
||||
std::vector<double> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; ++i) {
|
||||
term_value[i] = term_value_json[i].get<float>();
|
||||
}
|
||||
memcpy(term_query->field_value.data(), term_value.data(), term_size * sizeof(double));
|
||||
break;
|
||||
}
|
||||
case engine::meta::hybrid::DataType::DOUBLE: {
|
||||
std::vector<double> term_value(term_size, 0);
|
||||
for (uint64_t i = 0; i < term_size; ++i) {
|
||||
term_value[i] = term_value_json[i].get<double>();
|
||||
}
|
||||
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<std::string>();
|
||||
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<std::string>();
|
||||
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<std::string>();
|
||||
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<std::string>();
|
||||
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<std::string>();
|
||||
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<std::string>();
|
||||
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<query::LeafQuery>();
|
||||
auto term_json = json["term"];
|
||||
auto term_query = std::make_shared<query::TermQuery>();
|
||||
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<query::LeafQuery>();
|
||||
auto range_query = std::make_shared<query::RangeQuery>();
|
||||
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<query::LeafQuery>();
|
||||
auto vector_json = json["vector"];
|
||||
|
||||
leaf_query->vector_placeholder = vector_json.get<std::string>();
|
||||
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<query::BooleanQuery>();
|
||||
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 {
|
||||
status = ProcessLeafQueryJson(json, boolean_query);
|
||||
if (!status.ok()) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
} 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<query::BooleanQuery>();
|
||||
if (json.contains("must") || json.contains("should") || json.contains("must_not")) {
|
||||
status = ProcessBooleanQueryJson(json, should_query);
|
||||
if (!status.ok()) {
|
||||
return status;
|
||||
}
|
||||
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};
|
||||
}
|
||||
|
||||
for (auto& json : should_json) {
|
||||
if (json.contains("must") || json.contains("should") || json.contains("must_not")) {
|
||||
auto must_not_query = std::make_shared<query::BooleanQuery>();
|
||||
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};
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
Status
|
||||
GrpcRequestHandler::DeserializeJsonToBoolQuery(
|
||||
const google::protobuf::RepeatedPtrField<::milvus::grpc::VectorParam>& vector_params, const std::string& dsl_string,
|
||||
query::BooleanQueryPtr& boolean_query, std::unordered_map<std::string, query::VectorQueryPtr>& 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<query::VectorQuery>();
|
||||
vector_query->topk = it.value()["topk"].get<int64_t>();
|
||||
vector_query->field_name = it.value()["field_name"].get<std::string>();
|
||||
vector_query->extra_params = it.value()["params"];
|
||||
|
||||
engine::VectorsData vector_data;
|
||||
CopyRowRecords(vector_params.at(i).row_record(), google::protobuf::RepeatedField<google::protobuf::int64>(),
|
||||
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));
|
||||
}
|
||||
|
||||
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()};
|
||||
}
|
||||
}
|
||||
|
||||
::grpc::Status
|
||||
GrpcRequestHandler::HybridSearch(::grpc::ServerContext* context, const ::milvus::grpc::HSearchParam* request,
|
||||
::milvus::grpc::HQueryResult* response) {
|
||||
CHECK_NULLPTR_RETURN(request);
|
||||
LOG_SERVER_INFO_ << LogOut("Request [%s] %s begin.", GetContext(context)->RequestID().c_str(), __func__);
|
||||
|
||||
Status status;
|
||||
|
||||
status = request_handler_.DescribeHybridCollection(GetContext(context), request->collection_name(), field_type_);
|
||||
|
||||
query::BooleanQueryPtr boolean_query = std::make_shared<query::BooleanQuery>();
|
||||
query::QueryPtr query_ptr = std::make_shared<query::Query>();
|
||||
std::unordered_map<std::string, query::VectorQueryPtr> vectors;
|
||||
|
||||
DeserializeJsonToBoolQuery(request->vector_param(), request->dsl(), boolean_query, vectors);
|
||||
|
||||
query_ptr->vectors = vectors;
|
||||
|
||||
query::GeneralQueryPtr general_query = std::make_shared<query::GeneralQuery>();
|
||||
query::GenBinaryQuery(boolean_query, general_query->bin);
|
||||
query_ptr->root = general_query->bin;
|
||||
|
||||
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<std::string> 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<std::string> 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_);
|
||||
|
||||
@ -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<std::string, query::VectorQueryPtr>& 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>> context_map_;
|
||||
std::unordered_map<std::string, std::shared_ptr<Context>> context_map_;
|
||||
std::shared_ptr<opentracing::Tracer> tracer_;
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType> field_type_;
|
||||
// std::unordered_map<::grpc::ServerContext*, std::unique_ptr<opentracing::Span>> span_map_;
|
||||
|
||||
mutable std::mt19937_64 random_num_generator_;
|
||||
|
||||
@ -611,7 +611,10 @@ WebRequestHandler::ProcessLeafQueryJson(const nlohmann::json& json, milvus::quer
|
||||
vector_query->topk = vector_json["topk"].get<int64_t>();
|
||||
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<query::BooleanQuery>();
|
||||
auto boolean_query = std::make_shared<query::BooleanQuery>();
|
||||
query_ptr_ = std::make_shared<query::Query>();
|
||||
|
||||
status = ProcessBoolQueryJson(boolean_query_json, boolean_query);
|
||||
if (!status.ok()) {
|
||||
return status;
|
||||
}
|
||||
query::GeneralQueryPtr general_query = std::make_shared<query::GeneralQuery>();
|
||||
auto general_query = std::make_shared<query::GeneralQuery>();
|
||||
query::GenBinaryQuery(boolean_query, general_query->bin);
|
||||
|
||||
context::HybridSearchContextPtr hybrid_search_context = std::make_shared<context::HybridSearchContext>();
|
||||
query_ptr_->root = general_query->bin;
|
||||
|
||||
engine::QueryResult result;
|
||||
std::vector<std::string> 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;
|
||||
|
||||
@ -250,6 +250,7 @@ class WebRequestHandler {
|
||||
private:
|
||||
std::shared_ptr<Context> context_ptr_;
|
||||
RequestHandler request_handler_;
|
||||
query::QueryPtr query_ptr_;
|
||||
std::unordered_map<std::string, engine::meta::hybrid::DataType> field_type_;
|
||||
};
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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<milvus::query::GeneralQuery>();
|
||||
general_query->bin->right_query = std::make_shared<milvus::query::GeneralQuery>();
|
||||
@ -167,7 +167,12 @@ ConstructGeneralQuery(milvus::query::GeneralQueryPtr& general_query) {
|
||||
left->bin->right_query->leaf->range_query = range_query;
|
||||
|
||||
right->leaf = std::make_shared<milvus::query::LeafQuery>();
|
||||
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<milvus::query::GeneralQuery>();
|
||||
ConstructGeneralQuery(general_query);
|
||||
auto general_query = std::make_shared<milvus::query::GeneralQuery>();
|
||||
auto query_ptr = std::make_shared<milvus::query::Query>();
|
||||
ConstructGeneralQuery(general_query, query_ptr);
|
||||
|
||||
std::vector<std::string> tags;
|
||||
milvus::context::HybridSearchContextPtr hybrid_context = std::make_shared<milvus::context::HybridSearchContext>();
|
||||
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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -18,15 +18,15 @@
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
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<int64_t>& 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<std::string> 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);
|
||||
conn_->HybridSearchPB(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;
|
||||
}
|
||||
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<milvus::Entity> entity_array;
|
||||
std::vector<int64_t> record_ids;
|
||||
{ // generate vectors
|
||||
milvus_sdk::Utils::ConstructVector(NQ, COLLECTION_DIMENSION, entity_array);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
std::vector<std::string> 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);
|
||||
}
|
||||
|
||||
@ -36,6 +36,9 @@ class ClientTest {
|
||||
void
|
||||
InsertHybridEntities(std::string&, int64_t);
|
||||
|
||||
void
|
||||
HybridSearchPB(std::string&);
|
||||
|
||||
void
|
||||
HybridSearch(std::string&);
|
||||
|
||||
|
||||
@ -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<milvus::Connection> 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<milvus::Connection> conn, const std::string& col
|
||||
CheckSearchResult(entity_array, topk_query_result);
|
||||
}
|
||||
|
||||
void ConstructVector(uint64_t nq, uint64_t dimension, std::vector<milvus::Entity>& query_vector) {
|
||||
void
|
||||
Utils::ConstructVector(uint64_t nq, uint64_t dimension, std::vector<milvus::Entity>& query_vector) {
|
||||
query_vector.resize(nq);
|
||||
std::default_random_engine e;
|
||||
std::uniform_real_distribution<float> u(0, 1);
|
||||
@ -246,7 +261,7 @@ void ConstructVector(uint64_t nq, uint64_t dimension, std::vector<milvus::Entity
|
||||
|
||||
std::vector<milvus::LeafQueryPtr>
|
||||
Utils::GenLeafQuery() {
|
||||
//Construct TermQuery
|
||||
// Construct TermQuery
|
||||
uint64_t row_num = 10000;
|
||||
std::vector<int64_t> 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<milvus::CompareExpr> ces{ce1, ce2};
|
||||
milvus::RangeQueryPtr rq = std::make_shared<milvus::RangeQuery>();
|
||||
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<milvus::LeafQueryPtr> lq;
|
||||
milvus::LeafQueryPtr lq1 = std::make_shared<milvus::LeafQuery>();
|
||||
milvus::LeafQueryPtr lq2 = std::make_shared<milvus::LeafQuery>();
|
||||
@ -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<int64_t> 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
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MilvusApi.h"
|
||||
#include "BooleanQuery.h"
|
||||
#include "MilvusApi.h"
|
||||
#include "thirdparty/nlohmann/json.hpp"
|
||||
|
||||
#include <memory>
|
||||
@ -54,8 +54,8 @@ class Utils {
|
||||
PrintIndexParam(const milvus::IndexParam& index_param);
|
||||
|
||||
static void
|
||||
BuildEntities(int64_t from, int64_t to, std::vector<milvus::Entity>& entity_array,
|
||||
std::vector<int64_t>& entity_ids, int64_t dimension);
|
||||
BuildEntities(int64_t from, int64_t to, std::vector<milvus::Entity>& entity_array, std::vector<int64_t>& entity_ids,
|
||||
int64_t dimension);
|
||||
|
||||
static void
|
||||
PrintSearchResult(const std::vector<std::pair<int64_t, milvus::Entity>>& entity_array,
|
||||
@ -71,8 +71,17 @@ class Utils {
|
||||
const std::vector<std::pair<int64_t, milvus::Entity>>& entity_array,
|
||||
milvus::TopKQueryResult& topk_query_result);
|
||||
|
||||
static void
|
||||
ConstructVector(uint64_t nq, uint64_t dimension, std::vector<milvus::Entity>& query_vector);
|
||||
|
||||
static std::vector<milvus::LeafQueryPtr>
|
||||
GenLeafQuery();
|
||||
|
||||
static void
|
||||
GenDSLJson(nlohmann::json& dsl_json, nlohmann::json& vector_param_json);
|
||||
|
||||
static void
|
||||
PrintTopKHybridQueryResult(milvus::TopKHybridQueryResult& topk_query_result);
|
||||
};
|
||||
|
||||
} // namespace milvus_sdk
|
||||
|
||||
@ -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<void(::grpc::Status)> 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<void(::grpc::Status)> 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;
|
||||
|
||||
@ -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<void(::grpc::Status)>) = 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<void(::grpc::Status)>) = 0;
|
||||
virtual void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) = 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<void(::grpc::Status)>) = 0;
|
||||
virtual void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) = 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<void(::grpc::Status)>) 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<void(::grpc::Status)>) override;
|
||||
void HybridSearchPB(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) 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<void(::grpc::Status)>) override;
|
||||
void HybridSearch(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::HQueryResult* response, std::function<void(::grpc::Status)>) 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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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<WithAsyncMethod_HasCollection<WithAsyncMethod_DescribeCollection<WithAsyncMethod_CountCollection<WithAsyncMethod_ShowCollections<WithAsyncMethod_ShowCollectionInfo<WithAsyncMethod_DropCollection<WithAsyncMethod_CreateIndex<WithAsyncMethod_DescribeIndex<WithAsyncMethod_DropIndex<WithAsyncMethod_CreatePartition<WithAsyncMethod_HasPartition<WithAsyncMethod_ShowPartitions<WithAsyncMethod_DropPartition<WithAsyncMethod_Insert<WithAsyncMethod_GetVectorsByID<WithAsyncMethod_GetVectorIDs<WithAsyncMethod_Search<WithAsyncMethod_SearchByID<WithAsyncMethod_SearchInFiles<WithAsyncMethod_Cmd<WithAsyncMethod_DeleteByID<WithAsyncMethod_PreloadCollection<WithAsyncMethod_Flush<WithAsyncMethod_Compact<WithAsyncMethod_CreateHybridCollection<WithAsyncMethod_HasHybridCollection<WithAsyncMethod_DropHybridCollection<WithAsyncMethod_DescribeHybridCollection<WithAsyncMethod_CountHybridCollection<WithAsyncMethod_ShowHybridCollections<WithAsyncMethod_ShowHybridCollectionInfo<WithAsyncMethod_PreloadHybridCollection<WithAsyncMethod_InsertEntity<WithAsyncMethod_HybridSearch<WithAsyncMethod_HybridSearchInSegments<WithAsyncMethod_GetEntityByID<WithAsyncMethod_GetEntityIDs<WithAsyncMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
|
||||
typedef WithAsyncMethod_CreateCollection<WithAsyncMethod_HasCollection<WithAsyncMethod_DescribeCollection<WithAsyncMethod_CountCollection<WithAsyncMethod_ShowCollections<WithAsyncMethod_ShowCollectionInfo<WithAsyncMethod_DropCollection<WithAsyncMethod_CreateIndex<WithAsyncMethod_DescribeIndex<WithAsyncMethod_DropIndex<WithAsyncMethod_CreatePartition<WithAsyncMethod_HasPartition<WithAsyncMethod_ShowPartitions<WithAsyncMethod_DropPartition<WithAsyncMethod_Insert<WithAsyncMethod_GetVectorsByID<WithAsyncMethod_GetVectorIDs<WithAsyncMethod_Search<WithAsyncMethod_SearchByID<WithAsyncMethod_SearchInFiles<WithAsyncMethod_Cmd<WithAsyncMethod_DeleteByID<WithAsyncMethod_PreloadCollection<WithAsyncMethod_Flush<WithAsyncMethod_Compact<WithAsyncMethod_CreateHybridCollection<WithAsyncMethod_HasHybridCollection<WithAsyncMethod_DropHybridCollection<WithAsyncMethod_DescribeHybridCollection<WithAsyncMethod_CountHybridCollection<WithAsyncMethod_ShowHybridCollections<WithAsyncMethod_ShowHybridCollectionInfo<WithAsyncMethod_PreloadHybridCollection<WithAsyncMethod_InsertEntity<WithAsyncMethod_HybridSearchPB<WithAsyncMethod_HybridSearch<WithAsyncMethod_HybridSearchInSegments<WithAsyncMethod_GetEntityByID<WithAsyncMethod_GetEntityIDs<WithAsyncMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
|
||||
template <class BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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<ExperimentalWithCallbackMethod_HasCollection<ExperimentalWithCallbackMethod_DescribeCollection<ExperimentalWithCallbackMethod_CountCollection<ExperimentalWithCallbackMethod_ShowCollections<ExperimentalWithCallbackMethod_ShowCollectionInfo<ExperimentalWithCallbackMethod_DropCollection<ExperimentalWithCallbackMethod_CreateIndex<ExperimentalWithCallbackMethod_DescribeIndex<ExperimentalWithCallbackMethod_DropIndex<ExperimentalWithCallbackMethod_CreatePartition<ExperimentalWithCallbackMethod_HasPartition<ExperimentalWithCallbackMethod_ShowPartitions<ExperimentalWithCallbackMethod_DropPartition<ExperimentalWithCallbackMethod_Insert<ExperimentalWithCallbackMethod_GetVectorsByID<ExperimentalWithCallbackMethod_GetVectorIDs<ExperimentalWithCallbackMethod_Search<ExperimentalWithCallbackMethod_SearchByID<ExperimentalWithCallbackMethod_SearchInFiles<ExperimentalWithCallbackMethod_Cmd<ExperimentalWithCallbackMethod_DeleteByID<ExperimentalWithCallbackMethod_PreloadCollection<ExperimentalWithCallbackMethod_Flush<ExperimentalWithCallbackMethod_Compact<ExperimentalWithCallbackMethod_CreateHybridCollection<ExperimentalWithCallbackMethod_HasHybridCollection<ExperimentalWithCallbackMethod_DropHybridCollection<ExperimentalWithCallbackMethod_DescribeHybridCollection<ExperimentalWithCallbackMethod_CountHybridCollection<ExperimentalWithCallbackMethod_ShowHybridCollections<ExperimentalWithCallbackMethod_ShowHybridCollectionInfo<ExperimentalWithCallbackMethod_PreloadHybridCollection<ExperimentalWithCallbackMethod_InsertEntity<ExperimentalWithCallbackMethod_HybridSearch<ExperimentalWithCallbackMethod_HybridSearchInSegments<ExperimentalWithCallbackMethod_GetEntityByID<ExperimentalWithCallbackMethod_GetEntityIDs<ExperimentalWithCallbackMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService;
|
||||
typedef ExperimentalWithCallbackMethod_CreateCollection<ExperimentalWithCallbackMethod_HasCollection<ExperimentalWithCallbackMethod_DescribeCollection<ExperimentalWithCallbackMethod_CountCollection<ExperimentalWithCallbackMethod_ShowCollections<ExperimentalWithCallbackMethod_ShowCollectionInfo<ExperimentalWithCallbackMethod_DropCollection<ExperimentalWithCallbackMethod_CreateIndex<ExperimentalWithCallbackMethod_DescribeIndex<ExperimentalWithCallbackMethod_DropIndex<ExperimentalWithCallbackMethod_CreatePartition<ExperimentalWithCallbackMethod_HasPartition<ExperimentalWithCallbackMethod_ShowPartitions<ExperimentalWithCallbackMethod_DropPartition<ExperimentalWithCallbackMethod_Insert<ExperimentalWithCallbackMethod_GetVectorsByID<ExperimentalWithCallbackMethod_GetVectorIDs<ExperimentalWithCallbackMethod_Search<ExperimentalWithCallbackMethod_SearchByID<ExperimentalWithCallbackMethod_SearchInFiles<ExperimentalWithCallbackMethod_Cmd<ExperimentalWithCallbackMethod_DeleteByID<ExperimentalWithCallbackMethod_PreloadCollection<ExperimentalWithCallbackMethod_Flush<ExperimentalWithCallbackMethod_Compact<ExperimentalWithCallbackMethod_CreateHybridCollection<ExperimentalWithCallbackMethod_HasHybridCollection<ExperimentalWithCallbackMethod_DropHybridCollection<ExperimentalWithCallbackMethod_DescribeHybridCollection<ExperimentalWithCallbackMethod_CountHybridCollection<ExperimentalWithCallbackMethod_ShowHybridCollections<ExperimentalWithCallbackMethod_ShowHybridCollectionInfo<ExperimentalWithCallbackMethod_PreloadHybridCollection<ExperimentalWithCallbackMethod_InsertEntity<ExperimentalWithCallbackMethod_HybridSearchPB<ExperimentalWithCallbackMethod_HybridSearch<ExperimentalWithCallbackMethod_HybridSearchInSegments<ExperimentalWithCallbackMethod_GetEntityByID<ExperimentalWithCallbackMethod_GetEntityIDs<ExperimentalWithCallbackMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_CreateCollection : public BaseClass {
|
||||
private:
|
||||
@ -4227,12 +4306,29 @@ class MilvusService final {
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 <class BaseClass>
|
||||
@ -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 BaseClass>
|
||||
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 BaseClass>
|
||||
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 BaseClass>
|
||||
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<BaseClass>::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 BaseClass>
|
||||
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<BaseClass>::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<BaseClass>::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<BaseClass>::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<BaseClass>::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<BaseClass>::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<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearchPB<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
|
||||
typedef WithStreamedUnaryMethod_CreateCollection<WithStreamedUnaryMethod_HasCollection<WithStreamedUnaryMethod_DescribeCollection<WithStreamedUnaryMethod_CountCollection<WithStreamedUnaryMethod_ShowCollections<WithStreamedUnaryMethod_ShowCollectionInfo<WithStreamedUnaryMethod_DropCollection<WithStreamedUnaryMethod_CreateIndex<WithStreamedUnaryMethod_DescribeIndex<WithStreamedUnaryMethod_DropIndex<WithStreamedUnaryMethod_CreatePartition<WithStreamedUnaryMethod_HasPartition<WithStreamedUnaryMethod_ShowPartitions<WithStreamedUnaryMethod_DropPartition<WithStreamedUnaryMethod_Insert<WithStreamedUnaryMethod_GetVectorsByID<WithStreamedUnaryMethod_GetVectorIDs<WithStreamedUnaryMethod_Search<WithStreamedUnaryMethod_SearchByID<WithStreamedUnaryMethod_SearchInFiles<WithStreamedUnaryMethod_Cmd<WithStreamedUnaryMethod_DeleteByID<WithStreamedUnaryMethod_PreloadCollection<WithStreamedUnaryMethod_Flush<WithStreamedUnaryMethod_Compact<WithStreamedUnaryMethod_CreateHybridCollection<WithStreamedUnaryMethod_HasHybridCollection<WithStreamedUnaryMethod_DropHybridCollection<WithStreamedUnaryMethod_DescribeHybridCollection<WithStreamedUnaryMethod_CountHybridCollection<WithStreamedUnaryMethod_ShowHybridCollections<WithStreamedUnaryMethod_ShowHybridCollectionInfo<WithStreamedUnaryMethod_PreloadHybridCollection<WithStreamedUnaryMethod_InsertEntity<WithStreamedUnaryMethod_HybridSearchPB<WithStreamedUnaryMethod_HybridSearch<WithStreamedUnaryMethod_HybridSearchInSegments<WithStreamedUnaryMethod_GetEntityByID<WithStreamedUnaryMethod_GetEntityIDs<WithStreamedUnaryMethod_DeleteEntitiesByID<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -784,12 +784,12 @@ WriteQueryToProto(::milvus::grpc::GeneralQuery* general_query, BooleanQueryPtr b
|
||||
}
|
||||
|
||||
Status
|
||||
ClientProxy::HybridSearch(const std::string& collection_name, const std::vector<std::string>& partition_list,
|
||||
BooleanQueryPtr& boolean_query, const std::string& extra_params,
|
||||
TopKHybridQueryResult& topk_query_result) {
|
||||
ClientProxy::HybridSearchPB(const std::string& collection_name, const std::vector<std::string>& 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<std::string>& partition_list,
|
||||
const std::string& dsl, const std::string& vector_param,
|
||||
const std::vector<Entity>& 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<int64_t>& id_array,
|
||||
milvus::HybridQueryResult& result) {
|
||||
|
||||
@ -67,8 +67,7 @@ class ClientProxy : public Connection {
|
||||
const std::vector<Entity>& entity_array, std::vector<int64_t>& id_array) override;
|
||||
|
||||
Status
|
||||
GetEntityByID(const std::string& collection_name,
|
||||
const std::vector<int64_t>& id_array,
|
||||
GetEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
std::vector<Entity>& 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<uint64_t>& id_array) override;
|
||||
|
||||
Status
|
||||
HybridSearchPB(const std::string& collection_name, const std::vector<std::string>& 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<std::string>& 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>& entity_array,
|
||||
TopKHybridQueryResult& query_result) override;
|
||||
|
||||
Status
|
||||
GetHEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -356,8 +356,7 @@ class Connection {
|
||||
* @return Indicate if the operation is succeed.
|
||||
*/
|
||||
virtual Status
|
||||
GetEntityByID(const std::string& collection_name,
|
||||
const std::vector<int64_t>& id_array,
|
||||
GetEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
std::vector<Entity>& 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<int64_t>& id_array) = 0;
|
||||
|
||||
/**
|
||||
@ -588,9 +586,14 @@ class Connection {
|
||||
InsertEntity(const std::string& collection_name, const std::string& partition_tag, HEntity& entities,
|
||||
std::vector<uint64_t>& id_array) = 0;
|
||||
|
||||
virtual Status
|
||||
HybridSearchPB(const std::string& collection_name, const std::vector<std::string>& 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<std::string>& partition_list,
|
||||
BooleanQueryPtr& boolean_query, const std::string& extra_params,
|
||||
const std::string& dsl, const std::string& vector_param, const std::vector<Entity>& entity_array,
|
||||
TopKHybridQueryResult& query_result) = 0;
|
||||
|
||||
virtual Status
|
||||
|
||||
@ -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<int64_t>& id_array,
|
||||
ConnectionImpl::GetEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
std::vector<Entity>& 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<std::string>& 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<std::string>& 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>& entity_array, milvus::TopKHybridQueryResult& query_result) {
|
||||
return client_proxy_->HybridSearch(collection_name, partition_list, dsl, vector_param, entity_array, query_result);
|
||||
}
|
||||
|
||||
Status
|
||||
|
||||
@ -69,8 +69,7 @@ class ConnectionImpl : public Connection {
|
||||
const std::vector<Entity>& entity_array, std::vector<int64_t>& id_array) override;
|
||||
|
||||
Status
|
||||
GetEntityByID(const std::string& collection_name,
|
||||
const std::vector<int64_t>& id_array,
|
||||
GetEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
std::vector<Entity>& 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<uint64_t>& id_array) override;
|
||||
|
||||
Status
|
||||
HybridSearchPB(const std::string& collection_name, const std::vector<std::string>& 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<std::string>& 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>& entity_array,
|
||||
TopKHybridQueryResult& query_result) override;
|
||||
|
||||
Status
|
||||
GetHEntityByID(const std::string& collection_name, const std::vector<int64_t>& id_array,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user