mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix add_vector_data bug in clientproxy
This commit is contained in:
parent
93d4798fef
commit
174e16ad26
@ -1,4 +1,4 @@
|
||||
We manually add two APIs in "milvus.pd.h":
|
||||
add_vector_data
|
||||
add_row_id_array
|
||||
add_vector_data()
|
||||
add_row_id_array()
|
||||
If proto files need be generated again, remember to re-add above APIs.
|
||||
@ -188,14 +188,13 @@ ClientProxy::Insert(const std::string& table_name, const std::vector<RowRecord>&
|
||||
|
||||
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.begin(), record.data.end());
|
||||
}
|
||||
grpc_record->add_vector_data(record.data.begin(), record.data.end());
|
||||
}
|
||||
|
||||
// Single thread
|
||||
::milvus::grpc::VectorIds vector_ids;
|
||||
if (!id_array.empty()) {
|
||||
/* set user's ids */
|
||||
insert_param.add_row_id_array(id_array.begin(), id_array.end());
|
||||
client_ptr_->Insert(vector_ids, insert_param, status);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user