diff --git a/internal/core/src/index/JsonInvertedIndex.cpp b/internal/core/src/index/JsonInvertedIndex.cpp index d02a92c8f6..00f09d5aed 100644 --- a/internal/core/src/index/JsonInvertedIndex.cpp +++ b/internal/core/src/index/JsonInvertedIndex.cpp @@ -36,6 +36,8 @@ JsonInvertedIndex::build_index_for_json( auto json_column = static_cast(data->RawValue(i)); if (this->schema_.nullable() && !data->is_valid(i)) { this->null_offset.push_back(i); + this->wrapper_->template add_array_data( + nullptr, 0, offset++); continue; } value_result res = json_column->at(nested_path_); @@ -45,7 +47,9 @@ JsonInvertedIndex::build_index_for_json( err == simdjson::NO_SUCH_FIELD, "Failed to parse json, err: {}", err); - offset++; + this->null_offset.push_back(i); + this->wrapper_->template add_array_data( + nullptr, 0, offset++); continue; } if constexpr (std::is_same_v) {