mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
merge 0.5.3 to 0.6.0
This commit is contained in:
commit
a57bfae626
20
CHANGELOG.md
20
CHANGELOG.md
@ -1,7 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
Please mark all change in change log and use the ticket from JIRA.
|
||||
|
||||
# Milvus 0.6.0 (TODO)
|
||||
|
||||
## Bug
|
||||
@ -22,8 +21,23 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
|
||||
## Task
|
||||
|
||||
# Milvus 0.5.3 (2019-11-13)
|
||||
|
||||
# Milvus 0.5.2 (TODO)
|
||||
## Bug
|
||||
- \#258 - Bytes type in proto cause big-endian/little-endian problem
|
||||
|
||||
## Feature
|
||||
|
||||
## Improvement
|
||||
- \#204 - improve grpc performance in search
|
||||
- \#207 - Add more unittest for config set/get
|
||||
- \#208 - optimize unittest to support run single test more easily
|
||||
- \#284 - Change C++ SDK to shared library
|
||||
- \#260 - C++ SDK README
|
||||
|
||||
## Task
|
||||
|
||||
# Milvus 0.5.2 (2019-11-07)
|
||||
|
||||
## Bug
|
||||
- \#194 - Search faild: message="Table file doesn't exist"
|
||||
@ -31,7 +45,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
## Feature
|
||||
|
||||
## Improvement
|
||||
- \#190 - Update default config:use_blas_threshold to 1100 and server version printout to 0.52
|
||||
- \#190 - Update default config:use_blas_threshold to 1100 and server version printout to 0.5.2
|
||||
|
||||
## Task
|
||||
|
||||
|
2
core/.gitignore
vendored
2
core/.gitignore
vendored
@ -2,7 +2,7 @@ milvus/
|
||||
conf/server_config.yaml
|
||||
conf/log_config.conf
|
||||
src/config.h
|
||||
version.h
|
||||
src/version.h
|
||||
lcov_out/
|
||||
base.info
|
||||
output.info
|
||||
|
@ -67,7 +67,7 @@ if (MILVUS_VERSION_MAJOR STREQUAL ""
|
||||
OR MILVUS_VERSION_PATCH STREQUAL "")
|
||||
message(WARNING "Failed to determine Milvus version from git branch name")
|
||||
set(MILVUS_VERSION "0.6.0")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
message(STATUS "Build version = ${MILVUS_VERSION}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h @ONLY)
|
||||
|
6
core/src/grpc/README.md
Normal file
6
core/src/grpc/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
We manually change two APIs in "milvus.pd.h":
|
||||
add_vector_data()
|
||||
add_row_id_array()
|
||||
add_ids()
|
||||
add_distances()
|
||||
If proto files need be generated again, remember to re-change above APIs.
|
0
core/src/grpc/cpp_gen.sh
Normal file → Executable file
0
core/src/grpc/cpp_gen.sh
Normal file → Executable file
@ -431,60 +431,60 @@ void MilvusService::Stub::experimental_async::Insert(::grpc::ClientContext* cont
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::VectorIds>::Create(channel_.get(), cq, rpcmethod_Insert_, context, request, false);
|
||||
}
|
||||
|
||||
::grpc::Status MilvusService::Stub::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResultList* response) {
|
||||
::grpc::Status MilvusService::Stub::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResult* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Search_, context, request, response);
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)> f) {
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Search_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)> f) {
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Search_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Search_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
void MilvusService::Stub::experimental_async::Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Search_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* MilvusService::Stub::AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResultList>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, true);
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, true);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* MilvusService::Stub::PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResultList>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, false);
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_Search_, context, request, false);
|
||||
}
|
||||
|
||||
::grpc::Status MilvusService::Stub::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResultList* response) {
|
||||
::grpc::Status MilvusService::Stub::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResult* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_SearchInFiles_, context, request, response);
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)> f) {
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SearchInFiles_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)> f) {
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SearchInFiles_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SearchInFiles_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
void MilvusService::Stub::experimental_async::SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
|
||||
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SearchInFiles_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* MilvusService::Stub::AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResultList>::Create(channel_.get(), cq, rpcmethod_SearchInFiles_, context, request, true);
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchInFiles_, context, request, true);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* MilvusService::Stub::PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResultList>::Create(channel_.get(), cq, rpcmethod_SearchInFiles_, context, request, false);
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* MilvusService::Stub::PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::TopKQueryResult>::Create(channel_.get(), cq, rpcmethod_SearchInFiles_, context, request, false);
|
||||
}
|
||||
|
||||
::grpc::Status MilvusService::Stub::Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::StringReply* response) {
|
||||
@ -640,12 +640,12 @@ MilvusService::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
MilvusService_method_names[13],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResultList>(
|
||||
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResult>(
|
||||
std::mem_fn(&MilvusService::Service::Search), this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
MilvusService_method_names[14],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResultList>(
|
||||
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResult>(
|
||||
std::mem_fn(&MilvusService::Service::SearchInFiles), this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
MilvusService_method_names[15],
|
||||
@ -758,14 +758,14 @@ MilvusService::Service::~Service() {
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status MilvusService::Service::Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response) {
|
||||
::grpc::Status MilvusService::Service::Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status MilvusService::Service::SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response) {
|
||||
::grpc::Status MilvusService::Service::SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
|
@ -221,26 +221,26 @@ class MilvusService final {
|
||||
//
|
||||
// @param SearchParam, search parameters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual ::grpc::Status Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResultList* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>> AsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>>(AsyncSearchRaw(context, request, cq));
|
||||
// @return TopKQueryResult
|
||||
virtual ::grpc::Status Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResult* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>> AsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>>(AsyncSearchRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>> PrepareAsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>>(PrepareAsyncSearchRaw(context, request, cq));
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchRaw(context, request, cq));
|
||||
}
|
||||
// *
|
||||
// @brief This method is used to query vector in specified files.
|
||||
//
|
||||
// @param SearchInFilesParam, search in files paremeters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual ::grpc::Status SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResultList* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>> AsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>>(AsyncSearchInFilesRaw(context, request, cq));
|
||||
// @return TopKQueryResult
|
||||
virtual ::grpc::Status SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResult* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>> AsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>>(AsyncSearchInFilesRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>> PrepareAsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>>(PrepareAsyncSearchInFilesRaw(context, request, cq));
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchInFilesRaw(context, request, cq));
|
||||
}
|
||||
// *
|
||||
// @brief This method is used to give the server status.
|
||||
@ -419,21 +419,21 @@ class MilvusService final {
|
||||
//
|
||||
// @param SearchParam, search parameters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
// @return TopKQueryResult
|
||||
virtual void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
// *
|
||||
// @brief This method is used to query vector in specified files.
|
||||
//
|
||||
// @param SearchInFilesParam, search in files paremeters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
// @return TopKQueryResult
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
virtual void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
|
||||
// *
|
||||
// @brief This method is used to give the server status.
|
||||
//
|
||||
@ -493,10 +493,10 @@ class MilvusService final {
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncDropPartitionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PartitionParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* AsyncInsertRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::VectorIds>* PrepareAsyncInsertRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>* AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>* PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>* AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResultList>* PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::StringReply>* AsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncDeleteByDateRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByDateParam& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
@ -598,19 +598,19 @@ class MilvusService final {
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>> PrepareAsyncInsert(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>>(PrepareAsyncInsertRaw(context, request, cq));
|
||||
}
|
||||
::grpc::Status Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResultList* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>> AsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>>(AsyncSearchRaw(context, request, cq));
|
||||
::grpc::Status Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::milvus::grpc::TopKQueryResult* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>> AsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>>(AsyncSearchRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>> PrepareAsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>>(PrepareAsyncSearchRaw(context, request, cq));
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearch(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchRaw(context, request, cq));
|
||||
}
|
||||
::grpc::Status SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResultList* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>> AsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>>(AsyncSearchInFilesRaw(context, request, cq));
|
||||
::grpc::Status SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::milvus::grpc::TopKQueryResult* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>> AsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>>(AsyncSearchInFilesRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>> PrepareAsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>>(PrepareAsyncSearchInFilesRaw(context, request, cq));
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>> PrepareAsyncSearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>>(PrepareAsyncSearchInFilesRaw(context, request, cq));
|
||||
}
|
||||
::grpc::Status Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::milvus::grpc::StringReply* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>> AsyncCmd(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) {
|
||||
@ -688,14 +688,14 @@ class MilvusService final {
|
||||
void Insert(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, std::function<void(::grpc::Status)>) override;
|
||||
void Insert(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Insert(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::VectorIds* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) override;
|
||||
void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) override;
|
||||
void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, std::function<void(::grpc::Status)>) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResultList* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) override;
|
||||
void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) override;
|
||||
void Search(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Search(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, std::function<void(::grpc::Status)>) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void SearchInFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::TopKQueryResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
void Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::StringReply* response, std::function<void(::grpc::Status)>) override;
|
||||
void Cmd(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::StringReply* response, std::function<void(::grpc::Status)>) override;
|
||||
void Cmd(::grpc::ClientContext* context, const ::milvus::grpc::Command* request, ::milvus::grpc::StringReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
|
||||
@ -745,10 +745,10 @@ class MilvusService final {
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncDropPartitionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PartitionParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* AsyncInsertRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::VectorIds>* PrepareAsyncInsertRaw(::grpc::ClientContext* context, const ::milvus::grpc::InsertParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResultList>* PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* AsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* AsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::TopKQueryResult>* PrepareAsyncSearchInFilesRaw(::grpc::ClientContext* context, const ::milvus::grpc::SearchInFilesParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>* AsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncDeleteByDateRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByDateParam& request, ::grpc::CompletionQueue* cq) override;
|
||||
@ -876,15 +876,15 @@ class MilvusService final {
|
||||
//
|
||||
// @param SearchParam, search parameters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual ::grpc::Status Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResultList* response);
|
||||
// @return TopKQueryResult
|
||||
virtual ::grpc::Status Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request, ::milvus::grpc::TopKQueryResult* response);
|
||||
// *
|
||||
// @brief This method is used to query vector in specified files.
|
||||
//
|
||||
// @param SearchInFilesParam, search in files paremeters.
|
||||
//
|
||||
// @return TopKQueryResultList
|
||||
virtual ::grpc::Status SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResultList* response);
|
||||
// @return TopKQueryResult
|
||||
virtual ::grpc::Status SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request, ::milvus::grpc::TopKQueryResult* response);
|
||||
// *
|
||||
// @brief This method is used to give the server status.
|
||||
//
|
||||
@ -1179,11 +1179,11 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestSearch(::grpc::ServerContext* context, ::milvus::grpc::SearchParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResultList>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
void RequestSearch(::grpc::ServerContext* context, ::milvus::grpc::SearchParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
@ -1199,11 +1199,11 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestSearchInFiles(::grpc::ServerContext* context, ::milvus::grpc::SearchInFilesParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResultList>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
void RequestSearchInFiles(::grpc::ServerContext* context, ::milvus::grpc::SearchInFilesParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::TopKQueryResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
|
||||
::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag);
|
||||
}
|
||||
};
|
||||
@ -1678,17 +1678,17 @@ class MilvusService final {
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_Search() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(13,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResultList>(
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResult>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::milvus::grpc::SearchParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response,
|
||||
::milvus::grpc::TopKQueryResult* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
return this->Search(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
void SetMessageAllocatorFor_Search(
|
||||
::grpc::experimental::MessageAllocator< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResultList>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResultList>*>(
|
||||
::grpc::experimental::MessageAllocator< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResult>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResult>*>(
|
||||
::grpc::Service::experimental().GetHandler(13))
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
@ -1696,11 +1696,11 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
virtual void Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_SearchInFiles : public BaseClass {
|
||||
@ -1709,17 +1709,17 @@ class MilvusService final {
|
||||
public:
|
||||
ExperimentalWithCallbackMethod_SearchInFiles() {
|
||||
::grpc::Service::experimental().MarkMethodCallback(14,
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResultList>(
|
||||
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResult>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
const ::milvus::grpc::SearchInFilesParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response,
|
||||
::milvus::grpc::TopKQueryResult* response,
|
||||
::grpc::experimental::ServerCallbackRpcController* controller) {
|
||||
return this->SearchInFiles(context, request, response, controller);
|
||||
}));
|
||||
}
|
||||
void SetMessageAllocatorFor_SearchInFiles(
|
||||
::grpc::experimental::MessageAllocator< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResultList>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResultList>*>(
|
||||
::grpc::experimental::MessageAllocator< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResult>* allocator) {
|
||||
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResult>*>(
|
||||
::grpc::Service::experimental().GetHandler(14))
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
@ -1727,11 +1727,11 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual void SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
virtual void SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class ExperimentalWithCallbackMethod_Cmd : public BaseClass {
|
||||
@ -2060,7 +2060,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -2077,7 +2077,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -2405,7 +2405,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -2425,7 +2425,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -2837,7 +2837,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -2862,7 +2862,7 @@ class MilvusService final {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
@ -3210,18 +3210,18 @@ class MilvusService final {
|
||||
public:
|
||||
WithStreamedUnaryMethod_Search() {
|
||||
::grpc::Service::MarkMethodStreamed(13,
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResultList>(std::bind(&WithStreamedUnaryMethod_Search<BaseClass>::StreamedSearch, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::SearchParam, ::milvus::grpc::TopKQueryResult>(std::bind(&WithStreamedUnaryMethod_Search<BaseClass>::StreamedSearch, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
}
|
||||
~WithStreamedUnaryMethod_Search() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status Search(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedSearch(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::SearchParam,::milvus::grpc::TopKQueryResultList>* server_unary_streamer) = 0;
|
||||
virtual ::grpc::Status StreamedSearch(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::SearchParam,::milvus::grpc::TopKQueryResult>* server_unary_streamer) = 0;
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_SearchInFiles : public BaseClass {
|
||||
@ -3230,18 +3230,18 @@ class MilvusService final {
|
||||
public:
|
||||
WithStreamedUnaryMethod_SearchInFiles() {
|
||||
::grpc::Service::MarkMethodStreamed(14,
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResultList>(std::bind(&WithStreamedUnaryMethod_SearchInFiles<BaseClass>::StreamedSearchInFiles, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::SearchInFilesParam, ::milvus::grpc::TopKQueryResult>(std::bind(&WithStreamedUnaryMethod_SearchInFiles<BaseClass>::StreamedSearchInFiles, this, std::placeholders::_1, std::placeholders::_2)));
|
||||
}
|
||||
~WithStreamedUnaryMethod_SearchInFiles() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResultList* /*response*/) override {
|
||||
::grpc::Status SearchInFiles(::grpc::ServerContext* /*context*/, const ::milvus::grpc::SearchInFilesParam* /*request*/, ::milvus::grpc::TopKQueryResult* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedSearchInFiles(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::SearchInFilesParam,::milvus::grpc::TopKQueryResultList>* server_unary_streamer) = 0;
|
||||
virtual ::grpc::Status StreamedSearchInFiles(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::SearchInFilesParam,::milvus::grpc::TopKQueryResult>* server_unary_streamer) = 0;
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_Cmd : public BaseClass {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,7 +48,7 @@ struct TableStruct_milvus_2eproto {
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[22]
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[20]
|
||||
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
|
||||
@ -84,9 +84,6 @@ extern PartitionNameDefaultTypeInternal _PartitionName_default_instance_;
|
||||
class PartitionParam;
|
||||
class PartitionParamDefaultTypeInternal;
|
||||
extern PartitionParamDefaultTypeInternal _PartitionParam_default_instance_;
|
||||
class QueryResult;
|
||||
class QueryResultDefaultTypeInternal;
|
||||
extern QueryResultDefaultTypeInternal _QueryResult_default_instance_;
|
||||
class Range;
|
||||
class RangeDefaultTypeInternal;
|
||||
extern RangeDefaultTypeInternal _Range_default_instance_;
|
||||
@ -117,9 +114,6 @@ extern TableSchemaDefaultTypeInternal _TableSchema_default_instance_;
|
||||
class TopKQueryResult;
|
||||
class TopKQueryResultDefaultTypeInternal;
|
||||
extern TopKQueryResultDefaultTypeInternal _TopKQueryResult_default_instance_;
|
||||
class TopKQueryResultList;
|
||||
class TopKQueryResultListDefaultTypeInternal;
|
||||
extern TopKQueryResultListDefaultTypeInternal _TopKQueryResultList_default_instance_;
|
||||
class VectorIds;
|
||||
class VectorIdsDefaultTypeInternal;
|
||||
extern VectorIdsDefaultTypeInternal _VectorIds_default_instance_;
|
||||
@ -135,7 +129,6 @@ template<> ::milvus::grpc::InsertParam* Arena::CreateMaybeMessage<::milvus::grpc
|
||||
template<> ::milvus::grpc::PartitionList* Arena::CreateMaybeMessage<::milvus::grpc::PartitionList>(Arena*);
|
||||
template<> ::milvus::grpc::PartitionName* Arena::CreateMaybeMessage<::milvus::grpc::PartitionName>(Arena*);
|
||||
template<> ::milvus::grpc::PartitionParam* Arena::CreateMaybeMessage<::milvus::grpc::PartitionParam>(Arena*);
|
||||
template<> ::milvus::grpc::QueryResult* Arena::CreateMaybeMessage<::milvus::grpc::QueryResult>(Arena*);
|
||||
template<> ::milvus::grpc::Range* Arena::CreateMaybeMessage<::milvus::grpc::Range>(Arena*);
|
||||
template<> ::milvus::grpc::RowRecord* Arena::CreateMaybeMessage<::milvus::grpc::RowRecord>(Arena*);
|
||||
template<> ::milvus::grpc::SearchInFilesParam* Arena::CreateMaybeMessage<::milvus::grpc::SearchInFilesParam>(Arena*);
|
||||
@ -146,7 +139,6 @@ template<> ::milvus::grpc::TableNameList* Arena::CreateMaybeMessage<::milvus::gr
|
||||
template<> ::milvus::grpc::TableRowCount* Arena::CreateMaybeMessage<::milvus::grpc::TableRowCount>(Arena*);
|
||||
template<> ::milvus::grpc::TableSchema* Arena::CreateMaybeMessage<::milvus::grpc::TableSchema>(Arena*);
|
||||
template<> ::milvus::grpc::TopKQueryResult* Arena::CreateMaybeMessage<::milvus::grpc::TopKQueryResult>(Arena*);
|
||||
template<> ::milvus::grpc::TopKQueryResultList* Arena::CreateMaybeMessage<::milvus::grpc::TopKQueryResultList>(Arena*);
|
||||
template<> ::milvus::grpc::VectorIds* Arena::CreateMaybeMessage<::milvus::grpc::VectorIds>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace milvus {
|
||||
@ -2021,144 +2013,6 @@ class SearchInFilesParam :
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class QueryResult :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.QueryResult) */ {
|
||||
public:
|
||||
QueryResult();
|
||||
virtual ~QueryResult();
|
||||
|
||||
QueryResult(const QueryResult& from);
|
||||
QueryResult(QueryResult&& from) noexcept
|
||||
: QueryResult() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline QueryResult& operator=(const QueryResult& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline QueryResult& operator=(QueryResult&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const QueryResult& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const QueryResult* internal_default_instance() {
|
||||
return reinterpret_cast<const QueryResult*>(
|
||||
&_QueryResult_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
12;
|
||||
|
||||
friend void swap(QueryResult& a, QueryResult& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(QueryResult* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline QueryResult* New() const final {
|
||||
return CreateMaybeMessage<QueryResult>(nullptr);
|
||||
}
|
||||
|
||||
QueryResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<QueryResult>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const QueryResult& from);
|
||||
void MergeFrom(const QueryResult& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(QueryResult* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.QueryResult";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
|
||||
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kIdFieldNumber = 1,
|
||||
kDistanceFieldNumber = 2,
|
||||
};
|
||||
// int64 id = 1;
|
||||
void clear_id();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 id() const;
|
||||
void set_id(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
|
||||
// double distance = 2;
|
||||
void clear_distance();
|
||||
double distance() const;
|
||||
void set_distance(double value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.QueryResult)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 id_;
|
||||
double distance_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_milvus_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class TopKQueryResult :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TopKQueryResult) */ {
|
||||
public:
|
||||
@ -2201,7 +2055,7 @@ class TopKQueryResult :
|
||||
&_TopKQueryResult_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
13;
|
||||
12;
|
||||
|
||||
friend void swap(TopKQueryResult& a, TopKQueryResult& b) {
|
||||
a.Swap(&b);
|
||||
@ -2272,156 +2126,32 @@ class TopKQueryResult :
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kQueryResultArraysFieldNumber = 1,
|
||||
};
|
||||
// repeated .milvus.grpc.QueryResult query_result_arrays = 1;
|
||||
int query_result_arrays_size() const;
|
||||
void clear_query_result_arrays();
|
||||
::milvus::grpc::QueryResult* mutable_query_result_arrays(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >*
|
||||
mutable_query_result_arrays();
|
||||
const ::milvus::grpc::QueryResult& query_result_arrays(int index) const;
|
||||
::milvus::grpc::QueryResult* add_query_result_arrays();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >&
|
||||
query_result_arrays() const;
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.TopKQueryResult)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult > query_result_arrays_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_milvus_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class TopKQueryResultList :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.TopKQueryResultList) */ {
|
||||
public:
|
||||
TopKQueryResultList();
|
||||
virtual ~TopKQueryResultList();
|
||||
|
||||
TopKQueryResultList(const TopKQueryResultList& from);
|
||||
TopKQueryResultList(TopKQueryResultList&& from) noexcept
|
||||
: TopKQueryResultList() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline TopKQueryResultList& operator=(const TopKQueryResultList& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline TopKQueryResultList& operator=(TopKQueryResultList&& from) noexcept {
|
||||
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
|
||||
if (this != &from) InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||
return GetMetadataStatic().descriptor;
|
||||
}
|
||||
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||
return GetMetadataStatic().reflection;
|
||||
}
|
||||
static const TopKQueryResultList& default_instance();
|
||||
|
||||
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
|
||||
static inline const TopKQueryResultList* internal_default_instance() {
|
||||
return reinterpret_cast<const TopKQueryResultList*>(
|
||||
&_TopKQueryResultList_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
14;
|
||||
|
||||
friend void swap(TopKQueryResultList& a, TopKQueryResultList& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(TopKQueryResultList* other) {
|
||||
if (other == this) return;
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
inline TopKQueryResultList* New() const final {
|
||||
return CreateMaybeMessage<TopKQueryResultList>(nullptr);
|
||||
}
|
||||
|
||||
TopKQueryResultList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
|
||||
return CreateMaybeMessage<TopKQueryResultList>(arena);
|
||||
}
|
||||
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
|
||||
void CopyFrom(const TopKQueryResultList& from);
|
||||
void MergeFrom(const TopKQueryResultList& from);
|
||||
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
size_t ByteSizeLong() const final;
|
||||
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||
#else
|
||||
bool MergePartialFromCodedStream(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
|
||||
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
|
||||
void SerializeWithCachedSizes(
|
||||
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
|
||||
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
|
||||
int GetCachedSize() const final { return _cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
inline void SharedCtor();
|
||||
inline void SharedDtor();
|
||||
void SetCachedSize(int size) const final;
|
||||
void InternalSwap(TopKQueryResultList* other);
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "milvus.grpc.TopKQueryResultList";
|
||||
}
|
||||
private:
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
|
||||
return nullptr;
|
||||
}
|
||||
inline void* MaybeArenaPtr() const {
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
private:
|
||||
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
|
||||
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kTopkQueryResultFieldNumber = 2,
|
||||
kIdsFieldNumber = 3,
|
||||
kDistancesFieldNumber = 4,
|
||||
kStatusFieldNumber = 1,
|
||||
kRowNumFieldNumber = 2,
|
||||
};
|
||||
// repeated .milvus.grpc.TopKQueryResult topk_query_result = 2;
|
||||
int topk_query_result_size() const;
|
||||
void clear_topk_query_result();
|
||||
::milvus::grpc::TopKQueryResult* mutable_topk_query_result(int index);
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::TopKQueryResult >*
|
||||
mutable_topk_query_result();
|
||||
const ::milvus::grpc::TopKQueryResult& topk_query_result(int index) const;
|
||||
::milvus::grpc::TopKQueryResult* add_topk_query_result();
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::TopKQueryResult >&
|
||||
topk_query_result() const;
|
||||
// repeated int64 ids = 3;
|
||||
int ids_size() const;
|
||||
void clear_ids();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 ids(int index) const;
|
||||
void set_ids(int index, ::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
void add_ids(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >&
|
||||
ids() const;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >*
|
||||
mutable_ids();
|
||||
|
||||
// repeated float distances = 4;
|
||||
int distances_size() const;
|
||||
void clear_distances();
|
||||
float distances(int index) const;
|
||||
void set_distances(int index, float value);
|
||||
void add_distances(float value);
|
||||
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >&
|
||||
distances() const;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedField< float >*
|
||||
mutable_distances();
|
||||
|
||||
// .milvus.grpc.Status status = 1;
|
||||
bool has_status() const;
|
||||
@ -2431,13 +2161,22 @@ class TopKQueryResultList :
|
||||
::milvus::grpc::Status* mutable_status();
|
||||
void set_allocated_status(::milvus::grpc::Status* status);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.TopKQueryResultList)
|
||||
// int64 row_num = 2;
|
||||
void clear_row_num();
|
||||
::PROTOBUF_NAMESPACE_ID::int64 row_num() const;
|
||||
void set_row_num(::PROTOBUF_NAMESPACE_ID::int64 value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.grpc.TopKQueryResult)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::TopKQueryResult > topk_query_result_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > ids_;
|
||||
mutable std::atomic<int> _ids_cached_byte_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedField< float > distances_;
|
||||
mutable std::atomic<int> _distances_cached_byte_size_;
|
||||
::milvus::grpc::Status* status_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 row_num_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_milvus_2eproto;
|
||||
};
|
||||
@ -2485,7 +2224,7 @@ class StringReply :
|
||||
&_StringReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
15;
|
||||
13;
|
||||
|
||||
friend void swap(StringReply& a, StringReply& b) {
|
||||
a.Swap(&b);
|
||||
@ -2632,7 +2371,7 @@ class BoolReply :
|
||||
&_BoolReply_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
16;
|
||||
14;
|
||||
|
||||
friend void swap(BoolReply& a, BoolReply& b) {
|
||||
a.Swap(&b);
|
||||
@ -2773,7 +2512,7 @@ class TableRowCount :
|
||||
&_TableRowCount_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
17;
|
||||
15;
|
||||
|
||||
friend void swap(TableRowCount& a, TableRowCount& b) {
|
||||
a.Swap(&b);
|
||||
@ -2914,7 +2653,7 @@ class Command :
|
||||
&_Command_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
18;
|
||||
16;
|
||||
|
||||
friend void swap(Command& a, Command& b) {
|
||||
a.Swap(&b);
|
||||
@ -3051,7 +2790,7 @@ class Index :
|
||||
&_Index_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
19;
|
||||
17;
|
||||
|
||||
friend void swap(Index& a, Index& b) {
|
||||
a.Swap(&b);
|
||||
@ -3189,7 +2928,7 @@ class IndexParam :
|
||||
&_IndexParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
20;
|
||||
18;
|
||||
|
||||
friend void swap(IndexParam& a, IndexParam& b) {
|
||||
a.Swap(&b);
|
||||
@ -3346,7 +3085,7 @@ class DeleteByDateParam :
|
||||
&_DeleteByDateParam_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
21;
|
||||
19;
|
||||
|
||||
friend void swap(DeleteByDateParam& a, DeleteByDateParam& b) {
|
||||
a.Swap(&b);
|
||||
@ -4773,101 +4512,35 @@ inline void SearchInFilesParam::set_allocated_search_param(::milvus::grpc::Searc
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// QueryResult
|
||||
|
||||
// int64 id = 1;
|
||||
inline void QueryResult::clear_id() {
|
||||
id_ = PROTOBUF_LONGLONG(0);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::int64 QueryResult::id() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.id)
|
||||
return id_;
|
||||
}
|
||||
inline void QueryResult::set_id(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
|
||||
id_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.QueryResult.id)
|
||||
}
|
||||
|
||||
// double distance = 2;
|
||||
inline void QueryResult::clear_distance() {
|
||||
distance_ = 0;
|
||||
}
|
||||
inline double QueryResult::distance() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.QueryResult.distance)
|
||||
return distance_;
|
||||
}
|
||||
inline void QueryResult::set_distance(double value) {
|
||||
|
||||
distance_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.QueryResult.distance)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// TopKQueryResult
|
||||
|
||||
// repeated .milvus.grpc.QueryResult query_result_arrays = 1;
|
||||
inline int TopKQueryResult::query_result_arrays_size() const {
|
||||
return query_result_arrays_.size();
|
||||
}
|
||||
inline void TopKQueryResult::clear_query_result_arrays() {
|
||||
query_result_arrays_.Clear();
|
||||
}
|
||||
inline ::milvus::grpc::QueryResult* TopKQueryResult::mutable_query_result_arrays(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.query_result_arrays)
|
||||
return query_result_arrays_.Mutable(index);
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >*
|
||||
TopKQueryResult::mutable_query_result_arrays() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResult.query_result_arrays)
|
||||
return &query_result_arrays_;
|
||||
}
|
||||
inline const ::milvus::grpc::QueryResult& TopKQueryResult::query_result_arrays(int index) const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.query_result_arrays)
|
||||
return query_result_arrays_.Get(index);
|
||||
}
|
||||
inline ::milvus::grpc::QueryResult* TopKQueryResult::add_query_result_arrays() {
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResult.query_result_arrays)
|
||||
return query_result_arrays_.Add();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::QueryResult >&
|
||||
TopKQueryResult::query_result_arrays() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResult.query_result_arrays)
|
||||
return query_result_arrays_;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// TopKQueryResultList
|
||||
|
||||
// .milvus.grpc.Status status = 1;
|
||||
inline bool TopKQueryResultList::has_status() const {
|
||||
inline bool TopKQueryResult::has_status() const {
|
||||
return this != internal_default_instance() && status_ != nullptr;
|
||||
}
|
||||
inline const ::milvus::grpc::Status& TopKQueryResultList::status() const {
|
||||
inline const ::milvus::grpc::Status& TopKQueryResult::status() const {
|
||||
const ::milvus::grpc::Status* p = status_;
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResultList.status)
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.status)
|
||||
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::grpc::Status*>(
|
||||
&::milvus::grpc::_Status_default_instance_);
|
||||
}
|
||||
inline ::milvus::grpc::Status* TopKQueryResultList::release_status() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.TopKQueryResultList.status)
|
||||
inline ::milvus::grpc::Status* TopKQueryResult::release_status() {
|
||||
// @@protoc_insertion_point(field_release:milvus.grpc.TopKQueryResult.status)
|
||||
|
||||
::milvus::grpc::Status* temp = status_;
|
||||
status_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::milvus::grpc::Status* TopKQueryResultList::mutable_status() {
|
||||
inline ::milvus::grpc::Status* TopKQueryResult::mutable_status() {
|
||||
|
||||
if (status_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::milvus::grpc::Status>(GetArenaNoVirtual());
|
||||
status_ = p;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResultList.status)
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResult.status)
|
||||
return status_;
|
||||
}
|
||||
inline void TopKQueryResultList::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
inline void TopKQueryResult::set_allocated_status(::milvus::grpc::Status* status) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_);
|
||||
@ -4883,37 +4556,81 @@ inline void TopKQueryResultList::set_allocated_status(::milvus::grpc::Status* st
|
||||
|
||||
}
|
||||
status_ = status;
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TopKQueryResultList.status)
|
||||
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.TopKQueryResult.status)
|
||||
}
|
||||
|
||||
// repeated .milvus.grpc.TopKQueryResult topk_query_result = 2;
|
||||
inline int TopKQueryResultList::topk_query_result_size() const {
|
||||
return topk_query_result_.size();
|
||||
// int64 row_num = 2;
|
||||
inline void TopKQueryResult::clear_row_num() {
|
||||
row_num_ = PROTOBUF_LONGLONG(0);
|
||||
}
|
||||
inline void TopKQueryResultList::clear_topk_query_result() {
|
||||
topk_query_result_.Clear();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::int64 TopKQueryResult::row_num() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.row_num)
|
||||
return row_num_;
|
||||
}
|
||||
inline ::milvus::grpc::TopKQueryResult* TopKQueryResultList::mutable_topk_query_result(int index) {
|
||||
// @@protoc_insertion_point(field_mutable:milvus.grpc.TopKQueryResultList.topk_query_result)
|
||||
return topk_query_result_.Mutable(index);
|
||||
inline void TopKQueryResult::set_row_num(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
|
||||
row_num_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.TopKQueryResult.row_num)
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::TopKQueryResult >*
|
||||
TopKQueryResultList::mutable_topk_query_result() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResultList.topk_query_result)
|
||||
return &topk_query_result_;
|
||||
|
||||
// repeated int64 ids = 3;
|
||||
inline int TopKQueryResult::ids_size() const {
|
||||
return ids_.size();
|
||||
}
|
||||
inline const ::milvus::grpc::TopKQueryResult& TopKQueryResultList::topk_query_result(int index) const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResultList.topk_query_result)
|
||||
return topk_query_result_.Get(index);
|
||||
inline void TopKQueryResult::clear_ids() {
|
||||
ids_.Clear();
|
||||
}
|
||||
inline ::milvus::grpc::TopKQueryResult* TopKQueryResultList::add_topk_query_result() {
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResultList.topk_query_result)
|
||||
return topk_query_result_.Add();
|
||||
inline ::PROTOBUF_NAMESPACE_ID::int64 TopKQueryResult::ids(int index) const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.ids)
|
||||
return ids_.Get(index);
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::grpc::TopKQueryResult >&
|
||||
TopKQueryResultList::topk_query_result() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResultList.topk_query_result)
|
||||
return topk_query_result_;
|
||||
inline void TopKQueryResult::set_ids(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
ids_.Set(index, value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.TopKQueryResult.ids)
|
||||
}
|
||||
inline void TopKQueryResult::add_ids(::PROTOBUF_NAMESPACE_ID::int64 value) {
|
||||
ids_.Add(value);
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResult.ids)
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >&
|
||||
TopKQueryResult::ids() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResult.ids)
|
||||
return ids_;
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >*
|
||||
TopKQueryResult::mutable_ids() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResult.ids)
|
||||
return &ids_;
|
||||
}
|
||||
|
||||
// repeated float distances = 4;
|
||||
inline int TopKQueryResult::distances_size() const {
|
||||
return distances_.size();
|
||||
}
|
||||
inline void TopKQueryResult::clear_distances() {
|
||||
distances_.Clear();
|
||||
}
|
||||
inline float TopKQueryResult::distances(int index) const {
|
||||
// @@protoc_insertion_point(field_get:milvus.grpc.TopKQueryResult.distances)
|
||||
return distances_.Get(index);
|
||||
}
|
||||
inline void TopKQueryResult::set_distances(int index, float value) {
|
||||
distances_.Set(index, value);
|
||||
// @@protoc_insertion_point(field_set:milvus.grpc.TopKQueryResult.distances)
|
||||
}
|
||||
inline void TopKQueryResult::add_distances(float value) {
|
||||
distances_.Add(value);
|
||||
// @@protoc_insertion_point(field_add:milvus.grpc.TopKQueryResult.distances)
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >&
|
||||
TopKQueryResult::distances() const {
|
||||
// @@protoc_insertion_point(field_list:milvus.grpc.TopKQueryResult.distances)
|
||||
return distances_;
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >*
|
||||
TopKQueryResult::mutable_distances() {
|
||||
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.TopKQueryResult.distances)
|
||||
return &distances_;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
@ -5527,10 +5244,6 @@ inline void DeleteByDateParam::set_allocated_table_name(std::string* table_name)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
@ -110,24 +110,11 @@ message SearchInFilesParam {
|
||||
/**
|
||||
* @brief Query result params
|
||||
*/
|
||||
message QueryResult {
|
||||
int64 id = 1;
|
||||
double distance = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TopK query result
|
||||
*/
|
||||
message TopKQueryResult {
|
||||
repeated QueryResult query_result_arrays = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief List of topK query result
|
||||
*/
|
||||
message TopKQueryResultList {
|
||||
Status status = 1;
|
||||
repeated TopKQueryResult topk_query_result = 2;
|
||||
int64 row_num = 2;
|
||||
repeated int64 ids = 3;
|
||||
repeated float distances = 4;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -311,18 +298,18 @@ service MilvusService {
|
||||
*
|
||||
* @param SearchParam, search parameters.
|
||||
*
|
||||
* @return TopKQueryResultList
|
||||
* @return TopKQueryResult
|
||||
*/
|
||||
rpc Search(SearchParam) returns (TopKQueryResultList) {}
|
||||
rpc Search(SearchParam) returns (TopKQueryResult) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to query vector in specified files.
|
||||
*
|
||||
* @param SearchInFilesParam, search in files paremeters.
|
||||
*
|
||||
* @return TopKQueryResultList
|
||||
* @return TopKQueryResult
|
||||
*/
|
||||
rpc SearchInFiles(SearchInFilesParam) returns (TopKQueryResultList) {}
|
||||
rpc SearchInFiles(SearchInFilesParam) returns (TopKQueryResult) {}
|
||||
|
||||
/**
|
||||
* @brief This method is used to give the server status.
|
||||
|
@ -202,14 +202,14 @@ parse_ann_test_name(const std::string& ann_test_name, size_t& dim, faiss::Metric
|
||||
int32_t
|
||||
GetResultHitCount(const faiss::Index::idx_t* ground_index, const faiss::Index::idx_t* index, size_t ground_k, size_t k,
|
||||
size_t nq, int32_t index_add_loops) {
|
||||
assert(ground_k <= k);
|
||||
size_t min_k = std::min(ground_k, k);
|
||||
int hit = 0;
|
||||
for (int i = 0; i < nq; i++) {
|
||||
// count the num of results exist in ground truth result set
|
||||
// each result replicates INDEX_ADD_LOOPS times
|
||||
for (int j_c = 0; j_c < k; j_c++) {
|
||||
int r_c = index[i * k + j_c];
|
||||
for (int j_g = 0; j_g < ground_k / index_add_loops; j_g++) {
|
||||
for (int j_g = 0; j_g < min_k / index_add_loops; j_g++) {
|
||||
if (ground_index[i * ground_k + j_g] == r_c) {
|
||||
hit++;
|
||||
continue;
|
||||
@ -283,7 +283,11 @@ load_base_data(faiss::Index*& index, const std::string& ann_test_name, const std
|
||||
// add index multiple times to get ~1G data set
|
||||
for (int i = 0; i < index_add_loops; i++) {
|
||||
printf("[%.3f s] No.%d Indexing database, size %ld*%ld\n", elapsed() - t0, i, nb, d);
|
||||
gpu_index->add(nb, xb);
|
||||
std::vector<faiss::Index::idx_t> xids(nb);
|
||||
for (int t = 0; t < nb; t++) {
|
||||
xids[t] = i * nb + t;
|
||||
}
|
||||
gpu_index->add_with_ids(nb, xb, xids.data());
|
||||
}
|
||||
|
||||
printf("[%.3f s] Coping GPU index to CPU\n", elapsed() - t0);
|
||||
@ -359,13 +363,14 @@ test_with_nprobes(const std::string& ann_test_name, const std::string& index_key
|
||||
const int32_t search_loops) {
|
||||
double t0 = elapsed();
|
||||
|
||||
const size_t NQ = 1000, NQ_START = 10, NQ_STEP = 10;
|
||||
const size_t K = 1000, K_START = 100, K_STEP = 10;
|
||||
const std::vector<size_t> NQ = {10, 100};
|
||||
const std::vector<size_t> K = {10, 100, 1000};
|
||||
const size_t GK = 100; // topk of ground truth
|
||||
|
||||
std::unordered_map<size_t, std::string> mode_str_map = {
|
||||
{MODE_CPU, "MODE_CPU"}, {MODE_MIX, "MODE_MIX"}, {MODE_GPU, "MODE_GPU"}};
|
||||
|
||||
double copy_time = 0.0;
|
||||
faiss::Index *gpu_index, *index;
|
||||
if (query_mode != MODE_CPU) {
|
||||
faiss::gpu::GpuClonerOptions option;
|
||||
@ -375,7 +380,6 @@ test_with_nprobes(const std::string& ann_test_name, const std::string& index_key
|
||||
index_composition.index = cpu_index;
|
||||
index_composition.quantizer = nullptr;
|
||||
|
||||
double copy_time;
|
||||
switch (query_mode) {
|
||||
case MODE_MIX: {
|
||||
index_composition.mode = 1; // 0: all data, 1: copy quantizer, 2: copy data
|
||||
@ -420,34 +424,39 @@ test_with_nprobes(const std::string& ann_test_name, const std::string& index_key
|
||||
}
|
||||
|
||||
for (auto nprobe : nprobes) {
|
||||
switch (query_mode) {
|
||||
case MODE_CPU:
|
||||
case MODE_MIX: {
|
||||
faiss::ParameterSpace params;
|
||||
std::string nprobe_str = "nprobe=" + std::to_string(nprobe);
|
||||
params.set_index_parameters(index, nprobe_str.c_str());
|
||||
break;
|
||||
}
|
||||
case MODE_GPU: {
|
||||
faiss::gpu::GpuIndexIVF* gpu_index_ivf = dynamic_cast<faiss::gpu::GpuIndexIVF*>(index);
|
||||
gpu_index_ivf->setNumProbes(nprobe);
|
||||
// brute-force need not set nprobe
|
||||
if (index_key.find("IDMap") == std::string::npos) {
|
||||
switch (query_mode) {
|
||||
case MODE_CPU:
|
||||
case MODE_MIX: {
|
||||
faiss::ParameterSpace params;
|
||||
std::string nprobe_str = "nprobe=" + std::to_string(nprobe);
|
||||
params.set_index_parameters(index, nprobe_str.c_str());
|
||||
break;
|
||||
}
|
||||
case MODE_GPU: {
|
||||
faiss::gpu::GpuIndexIVF* gpu_index_ivf = dynamic_cast<faiss::gpu::GpuIndexIVF*>(index);
|
||||
gpu_index_ivf->setNumProbes(nprobe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// output buffers
|
||||
faiss::Index::idx_t* I = new faiss::Index::idx_t[NQ * K];
|
||||
faiss::Index::distance_t* D = new faiss::Index::distance_t[NQ * K];
|
||||
faiss::Index::idx_t* I = new faiss::Index::idx_t[NQ.back() * K.back()];
|
||||
faiss::Index::distance_t* D = new faiss::Index::distance_t[NQ.back() * K.back()];
|
||||
|
||||
printf("\n%s | %s - %s | nprobe=%lu\n", ann_test_name.c_str(), index_key.c_str(),
|
||||
mode_str_map[query_mode].c_str(), nprobe);
|
||||
printf("======================================================================================\n");
|
||||
for (size_t t_nq = NQ_START; t_nq <= NQ; t_nq *= NQ_STEP) { // nq = {10, 100, 1000}
|
||||
for (size_t t_k = K_START; t_k <= K; t_k *= K_STEP) { // k = {100, 1000}
|
||||
for (size_t j = 0; j < K.size(); j++) {
|
||||
size_t t_k = K[j];
|
||||
for (size_t i = 0; i < NQ.size(); i++) {
|
||||
size_t t_nq = NQ[i];
|
||||
faiss::indexIVF_stats.quantization_time = 0.0;
|
||||
faiss::indexIVF_stats.search_time = 0.0;
|
||||
|
||||
double t_start = elapsed(), t_end;
|
||||
for (int i = 0; i < search_loops; i++) {
|
||||
for (int s = 0; s < search_loops; s++) {
|
||||
index->search(t_nq, xq, t_k, D, I);
|
||||
}
|
||||
t_end = elapsed();
|
||||
@ -466,7 +475,7 @@ test_with_nprobes(const std::string& ann_test_name, const std::string& index_key
|
||||
printf("nq = %4ld, k = %4ld, elapse = %.4fs (quant = %.4fs, search = %.4fs), R@ = %.4f\n", t_nq, t_k,
|
||||
(t_end - t_start) / search_loops, faiss::indexIVF_stats.quantization_time / 1000 / search_loops,
|
||||
faiss::indexIVF_stats.search_time / 1000 / search_loops,
|
||||
(hit / float(t_nq * GK / index_add_loops)));
|
||||
(hit / float(t_nq * std::min(GK, t_k) / index_add_loops)));
|
||||
}
|
||||
}
|
||||
printf("======================================================================================\n");
|
||||
@ -479,8 +488,9 @@ test_with_nprobes(const std::string& ann_test_name, const std::string& index_key
|
||||
}
|
||||
|
||||
void
|
||||
test_ann_hdf5(const std::string& ann_test_name, const std::string& index_type, const QueryMode query_mode,
|
||||
int32_t index_add_loops, const std::vector<size_t>& nprobes, int32_t search_loops) {
|
||||
test_ann_hdf5(const std::string& ann_test_name, const std::string& cluster_type, const std::string& index_type,
|
||||
const QueryMode query_mode, int32_t index_add_loops, const std::vector<size_t>& nprobes,
|
||||
int32_t search_loops) {
|
||||
double t0 = elapsed();
|
||||
|
||||
faiss::gpu::StandardGpuResources res;
|
||||
@ -493,7 +503,7 @@ test_ann_hdf5(const std::string& ann_test_name, const std::string& index_type, c
|
||||
return;
|
||||
}
|
||||
|
||||
std::string index_key = "IVF16384," + index_type;
|
||||
std::string index_key = cluster_type + "," + index_type;
|
||||
|
||||
if (!parse_ann_test_name(ann_test_name, dim, metric_type)) {
|
||||
printf("Invalid ann test name: %s\n", ann_test_name.c_str());
|
||||
@ -526,7 +536,7 @@ test_ann_hdf5(const std::string& ann_test_name, const std::string& index_type, c
|
||||
*
|
||||
* Dataset Dimensions Train_size Test_size Neighbors Distance Download
|
||||
* Fashion-
|
||||
* MNIST 784 60,000 10,000 100 Euclidean HDF5 (217MB)
|
||||
MNIST 784 60,000 10,000 100 Euclidean HDF5 (217MB)
|
||||
* GIST 960 1,000,000 1,000 100 Euclidean HDF5 (3.6GB)
|
||||
* GloVe 100 1,183,514 10,000 100 Angular HDF5 (463MB)
|
||||
* GloVe 200 1,183,514 10,000 100 Angular HDF5 (918MB)
|
||||
@ -542,30 +552,39 @@ TEST(FAISSTEST, BENCHMARK) {
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const int32_t SIFT_INSERT_LOOPS = 2; // insert twice to get ~1G data set
|
||||
|
||||
test_ann_hdf5("sift-128-euclidean", "Flat", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "Flat", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IDMap", "Flat", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IDMap", "Flat", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
|
||||
test_ann_hdf5("sift-128-euclidean", "SQ8", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "SQ8", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "Flat", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "Flat", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "SQ8", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "SQ8", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
|
||||
#ifdef CUSTOMIZATION
|
||||
test_ann_hdf5("sift-128-euclidean", "SQ8Hybrid", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "SQ8Hybrid", MODE_MIX, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "SQ8Hybrid", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "SQ8Hybrid", MODE_CPU, SIFT_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "SQ8Hybrid", MODE_MIX, SIFT_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
test_ann_hdf5("sift-128-euclidean", "IVF16384", "SQ8Hybrid", MODE_GPU, SIFT_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const int32_t GLOVE_INSERT_LOOPS = 1;
|
||||
|
||||
test_ann_hdf5("glove-200-angular", "Flat", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "Flat", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "Flat", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "Flat", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
|
||||
test_ann_hdf5("glove-200-angular", "SQ8", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "SQ8", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "SQ8", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "SQ8", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
|
||||
#ifdef CUSTOMIZATION
|
||||
test_ann_hdf5("glove-200-angular", "SQ8Hybrid", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "SQ8Hybrid", MODE_MIX, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "SQ8Hybrid", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes, SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "SQ8Hybrid", MODE_CPU, GLOVE_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "SQ8Hybrid", MODE_MIX, GLOVE_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
test_ann_hdf5("glove-200-angular", "IVF16384", "SQ8Hybrid", MODE_GPU, GLOVE_INSERT_LOOPS, param_nprobes,
|
||||
SEARCH_LOOPS);
|
||||
#endif
|
||||
}
|
||||
|
@ -133,18 +133,18 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
||||
{ // search vectors
|
||||
std::cout << "Search in correct partition" << std::endl;
|
||||
std::vector<std::string> partiton_tags = {std::to_string(TARGET_PARTITION)};
|
||||
std::vector<milvus::TopKQueryResult> topk_query_result_array;
|
||||
milvus::TopKQueryResult topk_query_result;
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
std::cout << "Search in wrong partition" << std::endl;
|
||||
partiton_tags = {"0"};
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
|
||||
std::cout << "Search by regex matched partition tag" << std::endl;
|
||||
partiton_tags = {"\\d"};
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
}
|
||||
|
||||
{ // wait unit build index finish
|
||||
@ -182,9 +182,9 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
||||
{ // search vectors
|
||||
std::cout << "Search in whole table" << std::endl;
|
||||
std::vector<std::string> partiton_tags;
|
||||
std::vector<milvus::TopKQueryResult> topk_query_result_array;
|
||||
milvus::TopKQueryResult topk_query_result;
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
}
|
||||
|
||||
{ // drop index
|
||||
|
@ -144,9 +144,9 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
||||
milvus_sdk::Utils::Sleep(3);
|
||||
{ // search vectors
|
||||
std::vector<std::string> partiton_tags;
|
||||
std::vector<milvus::TopKQueryResult> topk_query_result_array;
|
||||
milvus::TopKQueryResult topk_query_result;
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
}
|
||||
|
||||
{ // wait unit build index finish
|
||||
@ -169,9 +169,9 @@ ClientTest::Test(const std::string& address, const std::string& port) {
|
||||
|
||||
{ // search vectors
|
||||
std::vector<std::string> partiton_tags;
|
||||
std::vector<milvus::TopKQueryResult> topk_query_result_array;
|
||||
milvus::TopKQueryResult topk_query_result;
|
||||
milvus_sdk::Utils::DoSearch(conn, TABLE_NAME, partiton_tags, TOP_K, NPROBE, search_record_array,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
}
|
||||
|
||||
{ // drop index
|
||||
|
@ -155,32 +155,34 @@ Utils::BuildVectors(int64_t from, int64_t to, std::vector<milvus::RowRecord>& ve
|
||||
|
||||
void
|
||||
Utils::PrintSearchResult(const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
const std::vector<milvus::TopKQueryResult>& topk_query_result_array) {
|
||||
const milvus::TopKQueryResult& topk_query_result) {
|
||||
BLOCK_SPLITER
|
||||
std::cout << "Returned result count: " << topk_query_result_array.size() << std::endl;
|
||||
size_t nq = topk_query_result.row_num;
|
||||
size_t topk = topk_query_result.ids.size() / nq;
|
||||
std::cout << "Returned result count: " << nq * topk << std::endl;
|
||||
|
||||
int32_t index = 0;
|
||||
for (auto& result : topk_query_result_array) {
|
||||
for (size_t i = 0; i < nq; i++) {
|
||||
auto search_id = search_record_array[index].first;
|
||||
index++;
|
||||
std::cout << "No." << std::to_string(index) << " vector " << std::to_string(search_id) << " top "
|
||||
<< std::to_string(result.query_result_arrays.size()) << " search result:" << std::endl;
|
||||
for (auto& item : result.query_result_arrays) {
|
||||
std::cout << "\t" << std::to_string(item.id) << "\tdistance:" << std::to_string(item.distance);
|
||||
std::cout << std::endl;
|
||||
std::cout << "No." << index << " vector " << search_id << " top " << topk << " search result:" << std::endl;
|
||||
for (size_t j = 0; j < topk; j++) {
|
||||
size_t idx = i * nq + j;
|
||||
std::cout << "\t" << topk_query_result.ids[idx] << "\t" << topk_query_result.distances[idx] << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
BLOCK_SPLITER
|
||||
}
|
||||
|
||||
void
|
||||
Utils::CheckSearchResult(const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
const std::vector<milvus::TopKQueryResult>& topk_query_result_array) {
|
||||
const milvus::TopKQueryResult& topk_query_result) {
|
||||
BLOCK_SPLITER
|
||||
size_t nq = topk_query_result.row_num;
|
||||
size_t result_k = topk_query_result.ids.size() / nq;
|
||||
int64_t index = 0;
|
||||
for (auto& result : topk_query_result_array) {
|
||||
auto result_id = result.query_result_arrays[0].id;
|
||||
for (size_t i = 0; i < nq; i++) {
|
||||
auto result_id = topk_query_result.ids[i * result_k];
|
||||
auto search_id = search_record_array[index++].first;
|
||||
if (result_id != search_id) {
|
||||
std::cout << "The top 1 result is wrong: " << result_id << " vs. " << search_id << std::endl;
|
||||
@ -195,8 +197,10 @@ void
|
||||
Utils::DoSearch(std::shared_ptr<milvus::Connection> conn, const std::string& table_name,
|
||||
const std::vector<std::string>& partiton_tags, int64_t top_k, int64_t nprobe,
|
||||
const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
std::vector<milvus::TopKQueryResult>& topk_query_result_array) {
|
||||
topk_query_result_array.clear();
|
||||
milvus::TopKQueryResult& topk_query_result) {
|
||||
topk_query_result.distances.clear();
|
||||
topk_query_result.ids.clear();
|
||||
topk_query_result.row_num = 0;
|
||||
|
||||
std::vector<milvus::Range> query_range_array;
|
||||
milvus::Range rg;
|
||||
@ -212,14 +216,14 @@ Utils::DoSearch(std::shared_ptr<milvus::Connection> conn, const std::string& tab
|
||||
{
|
||||
BLOCK_SPLITER
|
||||
milvus_sdk::TimeRecorder rc("search");
|
||||
milvus::Status stat = conn->Search(table_name, partiton_tags, record_array, query_range_array, top_k, nprobe,
|
||||
topk_query_result_array);
|
||||
milvus::Status stat =
|
||||
conn->Search(table_name, partiton_tags, record_array, query_range_array, top_k, nprobe, topk_query_result);
|
||||
std::cout << "SearchVector function call status: " << stat.message() << std::endl;
|
||||
BLOCK_SPLITER
|
||||
}
|
||||
|
||||
PrintSearchResult(search_record_array, topk_query_result_array);
|
||||
CheckSearchResult(search_record_array, topk_query_result_array);
|
||||
PrintSearchResult(search_record_array, topk_query_result);
|
||||
CheckSearchResult(search_record_array, topk_query_result);
|
||||
}
|
||||
|
||||
} // namespace milvus_sdk
|
||||
|
@ -61,17 +61,17 @@ class Utils {
|
||||
|
||||
static void
|
||||
PrintSearchResult(const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
const std::vector<milvus::TopKQueryResult>& topk_query_result_array);
|
||||
const milvus::TopKQueryResult& topk_query_result);
|
||||
|
||||
static void
|
||||
CheckSearchResult(const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
const std::vector<milvus::TopKQueryResult>& topk_query_result_array);
|
||||
const milvus::TopKQueryResult& topk_query_result);
|
||||
|
||||
static void
|
||||
DoSearch(std::shared_ptr<milvus::Connection> conn, const std::string& table_name,
|
||||
const std::vector<std::string>& partiton_tags, int64_t top_k, int64_t nprobe,
|
||||
const std::vector<std::pair<int64_t, milvus::RowRecord>>& search_record_array,
|
||||
std::vector<milvus::TopKQueryResult>& topk_query_result_array);
|
||||
milvus::TopKQueryResult& topk_query_result);
|
||||
};
|
||||
|
||||
} // namespace milvus_sdk
|
||||
|
@ -32,6 +32,13 @@ UriCheck(const std::string& uri) {
|
||||
return (index != std::string::npos);
|
||||
}
|
||||
|
||||
void
|
||||
CopyRowRecord(::milvus::grpc::RowRecord* target, const RowRecord& src) {
|
||||
auto vector_data = target->mutable_vector_data();
|
||||
vector_data->Resize(static_cast<int>(src.data.size()), 0.0);
|
||||
memcpy(vector_data->mutable_data(), src.data.data(), src.data.size() * sizeof(float));
|
||||
}
|
||||
|
||||
Status
|
||||
ClientProxy::Connect(const ConnectParam& param) {
|
||||
std::string uri = param.ip_address + ":" + param.port;
|
||||
@ -189,23 +196,22 @@ ClientProxy::Insert(const std::string& table_name, const std::string& partition_
|
||||
|
||||
for (auto& record : record_array) {
|
||||
::milvus::grpc::RowRecord* grpc_record = insert_param.add_row_record_array();
|
||||
for (size_t i = 0; i < record.data.size(); i++) {
|
||||
grpc_record->add_vector_data(record.data[i]);
|
||||
}
|
||||
CopyRowRecord(grpc_record, record);
|
||||
}
|
||||
|
||||
// Single thread
|
||||
::milvus::grpc::VectorIds vector_ids;
|
||||
if (!id_array.empty()) {
|
||||
for (auto i = 0; i < id_array.size(); i++) {
|
||||
insert_param.add_row_id_array(id_array[i]);
|
||||
}
|
||||
/* set user's ids */
|
||||
auto row_ids = insert_param.mutable_row_id_array();
|
||||
row_ids->Reserve(static_cast<int>(id_array.size()));
|
||||
memcpy(row_ids->mutable_data(), id_array.data(), id_array.size() * sizeof(int64_t));
|
||||
|
||||
client_ptr_->Insert(vector_ids, insert_param, status);
|
||||
} else {
|
||||
client_ptr_->Insert(vector_ids, insert_param, status);
|
||||
for (size_t i = 0; i < vector_ids.vector_id_array_size(); i++) {
|
||||
id_array.push_back(vector_ids.vector_id_array(i));
|
||||
}
|
||||
/* return Milvus generated ids back to user */
|
||||
id_array.insert(id_array.end(), vector_ids.vector_id_array().begin(), vector_ids.vector_id_array().end());
|
||||
}
|
||||
#endif
|
||||
} catch (std::exception& ex) {
|
||||
@ -218,7 +224,7 @@ ClientProxy::Insert(const std::string& table_name, const std::string& partition_
|
||||
Status
|
||||
ClientProxy::Search(const std::string& table_name, const std::vector<std::string>& partiton_tags,
|
||||
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array,
|
||||
int64_t topk, int64_t nprobe, std::vector<TopKQueryResult>& topk_query_result_array) {
|
||||
int64_t topk, int64_t nprobe, TopKQueryResult& topk_query_result) {
|
||||
try {
|
||||
// step 1: convert vectors data
|
||||
::milvus::grpc::SearchParam search_param;
|
||||
@ -230,9 +236,7 @@ ClientProxy::Search(const std::string& table_name, const std::vector<std::string
|
||||
}
|
||||
for (auto& record : query_record_array) {
|
||||
::milvus::grpc::RowRecord* row_record = search_param.add_query_record_array();
|
||||
for (auto& rec : record.data) {
|
||||
row_record->add_vector_data(rec);
|
||||
}
|
||||
CopyRowRecord(row_record, record);
|
||||
}
|
||||
|
||||
// step 2: convert range array
|
||||
@ -243,21 +247,17 @@ ClientProxy::Search(const std::string& table_name, const std::vector<std::string
|
||||
}
|
||||
|
||||
// step 3: search vectors
|
||||
::milvus::grpc::TopKQueryResultList topk_query_result_list;
|
||||
Status status = client_ptr_->Search(topk_query_result_list, search_param);
|
||||
::milvus::grpc::TopKQueryResult result;
|
||||
Status status = client_ptr_->Search(result, search_param);
|
||||
|
||||
// step 4: convert result array
|
||||
for (uint64_t i = 0; i < topk_query_result_list.topk_query_result_size(); ++i) {
|
||||
TopKQueryResult result;
|
||||
for (uint64_t j = 0; j < topk_query_result_list.topk_query_result(i).query_result_arrays_size(); ++j) {
|
||||
QueryResult query_result;
|
||||
query_result.id = topk_query_result_list.topk_query_result(i).query_result_arrays(j).id();
|
||||
query_result.distance = topk_query_result_list.topk_query_result(i).query_result_arrays(j).distance();
|
||||
result.query_result_arrays.emplace_back(query_result);
|
||||
}
|
||||
topk_query_result.row_num = result.row_num();
|
||||
topk_query_result.ids.resize(result.ids().size());
|
||||
memcpy(topk_query_result.ids.data(), result.ids().data(), result.ids().size() * sizeof(int64_t));
|
||||
topk_query_result.distances.resize(result.distances().size());
|
||||
memcpy(topk_query_result.distances.data(), result.distances().data(),
|
||||
result.distances().size() * sizeof(float));
|
||||
|
||||
topk_query_result_array.emplace_back(result);
|
||||
}
|
||||
return status;
|
||||
} catch (std::exception& ex) {
|
||||
return Status(StatusCode::UnknownError, "fail to search vectors: " + std::string(ex.what()));
|
||||
|
@ -60,7 +60,7 @@ class ClientProxy : public Connection {
|
||||
Status
|
||||
Search(const std::string& table_name, const std::vector<std::string>& partiton_tags,
|
||||
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array, int64_t topk,
|
||||
int64_t nprobe, std::vector<TopKQueryResult>& topk_query_result_array) override;
|
||||
int64_t nprobe, TopKQueryResult& topk_query_result) override;
|
||||
|
||||
Status
|
||||
DescribeTable(const std::string& table_name, TableSchema& table_schema) override;
|
||||
|
@ -134,20 +134,20 @@ GrpcClient::Insert(::milvus::grpc::VectorIds& vector_ids, const ::milvus::grpc::
|
||||
}
|
||||
|
||||
Status
|
||||
GrpcClient::Search(::milvus::grpc::TopKQueryResultList& topk_query_result_list,
|
||||
GrpcClient::Search(::milvus::grpc::TopKQueryResult& topk_query_result,
|
||||
const ::milvus::grpc::SearchParam& search_param) {
|
||||
::milvus::grpc::TopKQueryResult query_result;
|
||||
ClientContext context;
|
||||
::grpc::Status grpc_status = stub_->Search(&context, search_param, &topk_query_result_list);
|
||||
::grpc::Status grpc_status = stub_->Search(&context, search_param, &topk_query_result);
|
||||
|
||||
if (!grpc_status.ok()) {
|
||||
std::cerr << "SearchVector rpc failed!" << std::endl;
|
||||
std::cerr << grpc_status.error_message() << std::endl;
|
||||
return Status(StatusCode::RPCFailed, grpc_status.error_message());
|
||||
}
|
||||
if (topk_query_result_list.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << topk_query_result_list.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, topk_query_result_list.status().reason());
|
||||
if (topk_query_result.status().error_code() != grpc::SUCCESS) {
|
||||
std::cerr << topk_query_result.status().reason() << std::endl;
|
||||
return Status(StatusCode::ServerFailed, topk_query_result.status().reason());
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
|
@ -57,7 +57,7 @@ class GrpcClient {
|
||||
Insert(grpc::VectorIds& vector_ids, const grpc::InsertParam& insert_param, Status& status);
|
||||
|
||||
Status
|
||||
Search(::milvus::grpc::TopKQueryResultList& topk_query_result_list, const grpc::SearchParam& search_param);
|
||||
Search(::milvus::grpc::TopKQueryResult& topk_query_result, const grpc::SearchParam& search_param);
|
||||
|
||||
Status
|
||||
DescribeTable(grpc::TableSchema& grpc_schema, const std::string& table_name);
|
||||
|
@ -78,19 +78,13 @@ struct RowRecord {
|
||||
std::vector<float> data; ///< Vector raw data
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Query result
|
||||
*/
|
||||
struct QueryResult {
|
||||
int64_t id; ///< Output result
|
||||
double distance; ///< Vector similarity distance
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief TopK query result
|
||||
*/
|
||||
struct TopKQueryResult {
|
||||
std::vector<QueryResult> query_result_arrays; ///< TopK query result
|
||||
int64_t row_num;
|
||||
std::vector<int64_t> ids;
|
||||
std::vector<float> distances;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -274,7 +268,7 @@ class Connection {
|
||||
virtual Status
|
||||
Search(const std::string& table_name, const std::vector<std::string>& partiton_tags,
|
||||
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array, int64_t topk,
|
||||
int64_t nprobe, std::vector<TopKQueryResult>& topk_query_result_array) = 0;
|
||||
int64_t nprobe, TopKQueryResult& topk_query_result) = 0;
|
||||
|
||||
/**
|
||||
* @brief Show table description
|
||||
|
@ -91,9 +91,9 @@ ConnectionImpl::Insert(const std::string& table_name, const std::string& partiti
|
||||
Status
|
||||
ConnectionImpl::Search(const std::string& table_name, const std::vector<std::string>& partiton_tags,
|
||||
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array,
|
||||
int64_t topk, int64_t nprobe, std::vector<TopKQueryResult>& topk_query_result_array) {
|
||||
int64_t topk, int64_t nprobe, TopKQueryResult& topk_query_result) {
|
||||
return client_proxy_->Search(table_name, partiton_tags, query_record_array, query_range_array, topk, nprobe,
|
||||
topk_query_result_array);
|
||||
topk_query_result);
|
||||
}
|
||||
|
||||
Status
|
||||
|
@ -62,7 +62,7 @@ class ConnectionImpl : public Connection {
|
||||
Status
|
||||
Search(const std::string& table_name, const std::vector<std::string>& partiton_tags,
|
||||
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array, int64_t topk,
|
||||
int64_t nprobe, std::vector<TopKQueryResult>& topk_query_result_array) override;
|
||||
int64_t nprobe, TopKQueryResult& topk_query_result) override;
|
||||
|
||||
Status
|
||||
DescribeTable(const std::string& table_name, TableSchema& table_schema) override;
|
||||
|
@ -93,11 +93,13 @@ static const char* CONFIG_RESOURCE_MODE = "mode";
|
||||
static const char* CONFIG_RESOURCE_MODE_DEFAULT = "simple";
|
||||
static const char* CONFIG_RESOURCE_SEARCH_RESOURCES = "search_resources";
|
||||
static const char* CONFIG_RESOURCE_SEARCH_RESOURCES_DELIMITER = ",";
|
||||
|
||||
#ifdef MILVUS_CPU_VERSION
|
||||
static const char* CONFIG_RESOURCE_SEARCH_RESOURCES_DEFAULT = "cpu";
|
||||
#else
|
||||
static const char* CONFIG_RESOURCE_SEARCH_RESOURCES_DEFAULT = "cpu,gpu0";
|
||||
#endif
|
||||
|
||||
static const char* CONFIG_RESOURCE_INDEX_BUILD_DEVICE = "index_build_device";
|
||||
#ifdef MILVUS_CPU_VERSION
|
||||
static const char* CONFIG_RESOURCE_INDEX_BUILD_DEVICE_DEFAULT = "cpu";
|
||||
|
@ -75,7 +75,7 @@ GrpcRequestHandler::Insert(::grpc::ServerContext* context, const ::milvus::grpc:
|
||||
|
||||
::grpc::Status
|
||||
GrpcRequestHandler::Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response) {
|
||||
::milvus::grpc::TopKQueryResult* response) {
|
||||
std::vector<std::string> file_id_array;
|
||||
BaseTaskPtr task_ptr = SearchTask::Create(request, file_id_array, response);
|
||||
::milvus::grpc::Status grpc_status;
|
||||
@ -87,7 +87,7 @@ GrpcRequestHandler::Search(::grpc::ServerContext* context, const ::milvus::grpc:
|
||||
|
||||
::grpc::Status
|
||||
GrpcRequestHandler::SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response) {
|
||||
::milvus::grpc::TopKQueryResult* response) {
|
||||
std::vector<std::string> file_id_array;
|
||||
for (int i = 0; i < request->file_id_array_size(); i++) {
|
||||
file_id_array.push_back(request->file_id_array(i));
|
||||
|
@ -153,7 +153,8 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service {
|
||||
// @return TopKQueryResultList
|
||||
::grpc::Status
|
||||
Search(::grpc::ServerContext* context, const ::milvus::grpc::SearchParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response) override;
|
||||
::milvus::grpc::TopKQueryResult* response) override;
|
||||
|
||||
// *
|
||||
// @brief This method is used to query vector in specified files.
|
||||
//
|
||||
@ -162,7 +163,8 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service {
|
||||
// @return TopKQueryResultList
|
||||
::grpc::Status
|
||||
SearchInFiles(::grpc::ServerContext* context, const ::milvus::grpc::SearchInFilesParam* request,
|
||||
::milvus::grpc::TopKQueryResultList* response) override;
|
||||
::milvus::grpc::TopKQueryResult* response) override;
|
||||
|
||||
// *
|
||||
// @brief This method is used to give the server status.
|
||||
//
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
//#include <gperftools/profiler.h>
|
||||
|
||||
@ -542,16 +543,16 @@ InsertTask::OnExecute() {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
SearchTask::SearchTask(const ::milvus::grpc::SearchParam* search_vector_infos,
|
||||
const std::vector<std::string>& file_id_array, ::milvus::grpc::TopKQueryResultList* response)
|
||||
const std::vector<std::string>& file_id_array, ::milvus::grpc::TopKQueryResult* response)
|
||||
: GrpcBaseTask(DQL_TASK_GROUP),
|
||||
search_param_(search_vector_infos),
|
||||
file_id_array_(file_id_array),
|
||||
topk_result_list(response) {
|
||||
topk_result_(response) {
|
||||
}
|
||||
|
||||
BaseTaskPtr
|
||||
SearchTask::Create(const ::milvus::grpc::SearchParam* search_vector_infos,
|
||||
const std::vector<std::string>& file_id_array, ::milvus::grpc::TopKQueryResultList* response) {
|
||||
const std::vector<std::string>& file_id_array, ::milvus::grpc::TopKQueryResult* response) {
|
||||
if (search_vector_infos == nullptr) {
|
||||
SERVER_LOG_ERROR << "grpc input is null!";
|
||||
return nullptr;
|
||||
@ -679,18 +680,13 @@ SearchTask::OnExecute() {
|
||||
return Status::OK(); // empty table
|
||||
}
|
||||
|
||||
size_t result_k = result_ids.size() / record_count;
|
||||
|
||||
// step 7: construct result array
|
||||
for (size_t i = 0; i < record_count; i++) {
|
||||
::milvus::grpc::TopKQueryResult* topk_query_result = topk_result_list->add_topk_query_result();
|
||||
for (size_t j = 0; j < result_k; j++) {
|
||||
::milvus::grpc::QueryResult* grpc_result = topk_query_result->add_query_result_arrays();
|
||||
size_t idx = i * result_k + j;
|
||||
grpc_result->set_id(result_ids[idx]);
|
||||
grpc_result->set_distance(result_distances[idx]);
|
||||
}
|
||||
}
|
||||
topk_result_->set_row_num(record_count);
|
||||
topk_result_->mutable_ids()->Resize(static_cast<int>(result_ids.size()), 0);
|
||||
memcpy(topk_result_->mutable_ids()->mutable_data(), result_ids.data(), result_ids.size() * sizeof(int64_t));
|
||||
topk_result_->mutable_distances()->Resize(static_cast<int>(result_distances.size()), 0.0);
|
||||
memcpy(topk_result_->mutable_distances()->mutable_data(), result_distances.data(),
|
||||
result_distances.size() * sizeof(float));
|
||||
|
||||
// step 8: print time cost percent
|
||||
rc.RecordSection("construct result and send");
|
||||
|
@ -153,11 +153,11 @@ class SearchTask : public GrpcBaseTask {
|
||||
public:
|
||||
static BaseTaskPtr
|
||||
Create(const ::milvus::grpc::SearchParam* search_param, const std::vector<std::string>& file_id_array,
|
||||
::milvus::grpc::TopKQueryResultList* response);
|
||||
::milvus::grpc::TopKQueryResult* response);
|
||||
|
||||
protected:
|
||||
SearchTask(const ::milvus::grpc::SearchParam* search_param, const std::vector<std::string>& file_id_array,
|
||||
::milvus::grpc::TopKQueryResultList* response);
|
||||
::milvus::grpc::TopKQueryResult* response);
|
||||
|
||||
Status
|
||||
OnExecute() override;
|
||||
@ -165,7 +165,7 @@ class SearchTask : public GrpcBaseTask {
|
||||
private:
|
||||
const ::milvus::grpc::SearchParam* search_param_;
|
||||
std::vector<std::string> file_id_array_;
|
||||
::milvus::grpc::TopKQueryResultList* topk_result_list;
|
||||
::milvus::grpc::TopKQueryResult* topk_result_;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -93,7 +93,7 @@ GrpcServer::StartService() {
|
||||
|
||||
builder.SetCompressionAlgorithmSupportStatus(GRPC_COMPRESS_STREAM_GZIP, true);
|
||||
builder.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_STREAM_GZIP);
|
||||
builder.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_HIGH);
|
||||
builder.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_NONE);
|
||||
|
||||
GrpcRequestHandler service;
|
||||
|
||||
|
@ -17,8 +17,16 @@
|
||||
# under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} test_files)
|
||||
set(test_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_db.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_db_mysql.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_engine.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_mem.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_meta.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_meta_mysql.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_misc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_search.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp)
|
||||
|
||||
add_executable(test_db
|
||||
${common_files}
|
||||
|
@ -17,7 +17,11 @@
|
||||
# under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} test_files)
|
||||
set(test_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_metricbase.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_metrics.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_prometheus.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp)
|
||||
|
||||
add_executable(test_metrics
|
||||
${common_files}
|
||||
|
@ -17,7 +17,17 @@
|
||||
# under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} test_files)
|
||||
set(test_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_algorithm.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_event.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_node.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_normal.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_resource.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_resource_factory.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_resource_mgr.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_scheduler.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_task.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_tasktable.cpp)
|
||||
|
||||
add_executable(test_scheduler
|
||||
${common_files}
|
||||
|
@ -17,7 +17,12 @@
|
||||
# under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} test_files)
|
||||
set(test_files
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cache.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_config.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_rpc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_util.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp)
|
||||
|
||||
include_directories("${CUDA_TOOLKIT_ROOT_DIR}/include")
|
||||
link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64")
|
||||
|
@ -415,6 +415,9 @@ TEST_F(ConfigTest, SERVER_CONFIG_INVALID_TEST) {
|
||||
s = config.SetResourceConfigSearchResources("gpu10");
|
||||
ASSERT_FALSE(s.ok());
|
||||
|
||||
s = config.SetResourceConfigSearchResources("cpu");
|
||||
ASSERT_TRUE(s.ok());
|
||||
|
||||
s = config.SetResourceConfigIndexBuildDevice("gup2");
|
||||
ASSERT_FALSE(s.ok());
|
||||
s = config.SetResourceConfigIndexBuildDevice("gpu16");
|
||||
@ -435,3 +438,4 @@ TEST_F(ConfigTest, SERVER_CONFIG_TEST) {
|
||||
s = config.ResetDefaultConfig();
|
||||
ASSERT_TRUE(s.ok());
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,12 @@ static constexpr int64_t VECTOR_COUNT = 1000;
|
||||
static constexpr int64_t INSERT_LOOP = 10;
|
||||
constexpr int64_t SECONDS_EACH_HOUR = 3600;
|
||||
|
||||
void CopyRowRecord(::milvus::grpc::RowRecord* target, const std::vector<float>& src) {
|
||||
auto vector_data = target->mutable_vector_data();
|
||||
vector_data->Resize(static_cast<int>(src.size()), 0.0);
|
||||
memcpy(vector_data->mutable_data(), src.data(), src.size()* sizeof(float));
|
||||
}
|
||||
|
||||
class RpcHandlerTest : public testing::Test {
|
||||
protected:
|
||||
void
|
||||
@ -201,9 +207,7 @@ TEST_F(RpcHandlerTest, INSERT_TEST) {
|
||||
::milvus::grpc::VectorIds vector_ids;
|
||||
for (auto& record : record_array) {
|
||||
::milvus::grpc::RowRecord* grpc_record = request.add_row_record_array();
|
||||
for (size_t i = 0; i < record.size(); i++) {
|
||||
grpc_record->add_vector_data(record[i]);
|
||||
}
|
||||
CopyRowRecord(grpc_record, record);
|
||||
}
|
||||
handler->Insert(&context, &request, &vector_ids);
|
||||
ASSERT_EQ(vector_ids.vector_id_array_size(), VECTOR_COUNT);
|
||||
@ -212,8 +216,8 @@ TEST_F(RpcHandlerTest, INSERT_TEST) {
|
||||
TEST_F(RpcHandlerTest, SEARCH_TEST) {
|
||||
::grpc::ServerContext context;
|
||||
::milvus::grpc::SearchParam request;
|
||||
::milvus::grpc::TopKQueryResultList response;
|
||||
// test null input
|
||||
::milvus::grpc::TopKQueryResult response;
|
||||
//test null input
|
||||
handler->Search(&context, nullptr, &response);
|
||||
|
||||
// test invalid table name
|
||||
@ -240,22 +244,17 @@ TEST_F(RpcHandlerTest, SEARCH_TEST) {
|
||||
::milvus::grpc::InsertParam insert_param;
|
||||
for (auto& record : record_array) {
|
||||
::milvus::grpc::RowRecord* grpc_record = insert_param.add_row_record_array();
|
||||
for (size_t i = 0; i < record.size(); i++) {
|
||||
grpc_record->add_vector_data(record[i]);
|
||||
}
|
||||
CopyRowRecord(grpc_record, record);
|
||||
}
|
||||
// insert vectors
|
||||
insert_param.set_table_name(TABLE_NAME);
|
||||
::milvus::grpc::VectorIds vector_ids;
|
||||
handler->Insert(&context, &insert_param, &vector_ids);
|
||||
sleep(7);
|
||||
|
||||
BuildVectors(0, 10, record_array);
|
||||
for (auto& record : record_array) {
|
||||
::milvus::grpc::RowRecord* row_record = request.add_query_record_array();
|
||||
for (auto& rec : record) {
|
||||
row_record->add_vector_data(rec);
|
||||
}
|
||||
CopyRowRecord(row_record, record);
|
||||
}
|
||||
handler->Search(&context, &request, &response);
|
||||
|
||||
@ -324,9 +323,7 @@ TEST_F(RpcHandlerTest, TABLES_TEST) {
|
||||
|
||||
for (auto& record : record_array) {
|
||||
::milvus::grpc::RowRecord* grpc_record = request.add_row_record_array();
|
||||
for (size_t i = 0; i < record.size(); i++) {
|
||||
grpc_record->add_vector_data(record[i]);
|
||||
}
|
||||
CopyRowRecord(grpc_record, record);
|
||||
}
|
||||
// test vector_id size not equal to row record size
|
||||
vector_ids.clear_vector_id_array();
|
||||
@ -341,9 +338,7 @@ TEST_F(RpcHandlerTest, TABLES_TEST) {
|
||||
vector_ids.clear_vector_id_array();
|
||||
for (uint64_t i = 0; i < 10; ++i) {
|
||||
::milvus::grpc::RowRecord* grpc_record = request.add_row_record_array();
|
||||
for (size_t j = 0; j < 10; j++) {
|
||||
grpc_record->add_vector_data(record_array[i][j]);
|
||||
}
|
||||
CopyRowRecord(grpc_record, record_array[i]);
|
||||
}
|
||||
handler->Insert(&context, &request, &vector_ids);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user