Reduce memory usage of scalar index (#21970)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/21993/head
zhenshan.cao 2023-02-03 19:01:53 +08:00 committed by GitHub
parent 6d05f102c1
commit 5316743a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,6 +44,6 @@ struct IndexStructure {
return a_ == b.a_;
}
T a_;
size_t idx_;
int32_t idx_;
};
} // namespace milvus::index

View File

@ -81,7 +81,7 @@ class ScalarIndexSort : public ScalarIndex<T> {
private:
bool is_built_;
Config config_;
std::vector<size_t> idx_to_offsets_; // used to retrieve.
std::vector<int32_t> idx_to_offsets_; // used to retrieve.
std::vector<IndexStructure<T>> data_;
};