fix: [2.5] Only generate the index_null_offset file when the field support null value (#38834)

issue: #38832 

master pr: #38833

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/38853/head
cai.zhang 2024-12-30 17:02:52 +08:00 committed by GitHub
parent e6c3d40d90
commit 015e50e4de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -124,8 +124,10 @@ InvertedIndexTantivy<T>::Serialize(const Config& config) {
new uint8_t[index_valid_data_length]);
memcpy(index_valid_data.get(), null_offset.data(), index_valid_data_length);
BinarySet res_set;
res_set.Append(
"index_null_offset", index_valid_data, index_valid_data_length);
if (index_valid_data_length > 0) {
res_set.Append(
"index_null_offset", index_valid_data, index_valid_data_length);
}
milvus::Disassemble(res_set);
return res_set;
}