Skip to content

Commit

Permalink
fix: Fix offset out of range for creating Trie index (#35553)
Browse files Browse the repository at this point in the history
issue: #35550

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
  • Loading branch information
xiaocai2333 authored Aug 25, 2024
1 parent f2b83d3 commit 615a653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/core/src/index/StringIndexMarisa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ StringIndexMarisa::BuildWithFieldData(
for (const auto& data : field_datas) {
auto slice_num = data->get_num_rows();
for (int64_t i = 0; i < slice_num; ++i) {
if (data->is_valid(offset)) {
if (data->is_valid(i)) {
auto str_id =
lookup(*static_cast<const std::string*>(data->RawValue(i)));
AssertInfo(valid_str_id(str_id), "invalid marisa key");
Expand Down

0 comments on commit 615a653

Please sign in to comment.