Reduce memory usage of scalar index (#21970) (#21978)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/21986/head
zhenshan.cao 2023-02-03 20:07:53 +08:00 committed by GitHub
parent 51f751940c
commit 68156b3d6d
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_;
};