enhance: add log to bitmap index (#34197)

#32900

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
pull/34276/head
zhagnlu 2024-06-30 20:02:06 +08:00 committed by GitHub
parent 96dcee5dff
commit cc1bc07bfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -244,6 +244,8 @@ void
HybridScalarIndex<T>::BuildInternal(
const std::vector<FieldDataPtr>& field_datas) {
auto index = GetInternalIndex();
LOG_INFO("build bitmap index with internal index:{}",
ToString(internal_index_type_));
index->BuildWithFieldData(field_datas);
}
@ -404,6 +406,8 @@ HybridScalarIndex<T>::Load(const BinarySet& binary_set, const Config& config) {
DeserializeIndexType(binary_set);
auto index = GetInternalIndex();
LOG_INFO("load bitmap index with internal index:{}",
ToString(internal_index_type_));
index->Load(binary_set, config);
is_built_ = true;
@ -435,6 +439,8 @@ HybridScalarIndex<T>::Load(milvus::tracer::TraceContext ctx,
DeserializeIndexType(binary_set);
auto index = GetInternalIndex();
LOG_INFO("load bitmap index with internal index:{}",
ToString(internal_index_type_));
index->Load(ctx, config);
is_built_ = true;

View File

@ -37,6 +37,26 @@ enum class ScalarIndexType {
HYBRID,
};
inline std::string
ToString(ScalarIndexType type) {
switch (type) {
case ScalarIndexType::NONE:
return "NONE";
case ScalarIndexType::BITMAP:
return "BITMAP";
case ScalarIndexType::STLSORT:
return "STLSORT";
case ScalarIndexType::MARISA:
return "MARISA";
case ScalarIndexType::INVERTED:
return "INVERTED";
case ScalarIndexType::HYBRID:
return "HYBRID";
default:
return "UNKNOWN";
}
}
template <typename T>
class ScalarIndex : public IndexBase {
public: