@@ -258,7 +258,6 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
258
258
}
259
259
260
260
for (int i = 0 ; i < count; ++i) {
261
- new_fulltext_field (empty_value.c_str (), 0 );
262
261
RETURN_IF_ERROR (add_null_document ());
263
262
}
264
263
}
@@ -305,13 +304,10 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
305
304
get_parser_ignore_above_value_from_properties (_index_meta->properties ());
306
305
auto ignore_above = std::stoi (ignore_above_value);
307
306
for (int i = 0 ; i < count; ++i) {
308
- // only ignore_above UNTOKENIZED strings
309
- if (_parser_type == InvertedIndexParserType::PARSER_NONE &&
310
- v->get_size () > ignore_above) {
311
- VLOG_DEBUG << " fulltext index value length can be at most "
312
- << ignore_above_value << " , but got "
313
- << " value length:" << v->get_size () << " , ignore this value" ;
314
- new_fulltext_field (empty_value.c_str (), 0 );
307
+ // only ignore_above UNTOKENIZED strings and empty strings not tokenized
308
+ if ((_parser_type == InvertedIndexParserType::PARSER_NONE &&
309
+ v->get_size () > ignore_above) ||
310
+ (_parser_type != InvertedIndexParserType::PARSER_NONE && v->empty ())) {
315
311
RETURN_IF_ERROR (add_null_document ());
316
312
} else {
317
313
new_fulltext_field (v->get_data (), v->get_size ());
@@ -358,13 +354,10 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
358
354
}
359
355
360
356
auto value = join (strings, " " );
361
- // only ignore_above UNTOKENIZED strings
362
- if (_parser_type == InvertedIndexParserType::PARSER_NONE &&
363
- value.length () > ignore_above) {
364
- VLOG_DEBUG << " fulltext index value length can be at most "
365
- << ignore_above_value << " , but got "
366
- << " value length:" << value.length () << " , ignore this value" ;
367
- new_fulltext_field (empty_value.c_str (), 0 );
357
+ // only ignore_above UNTOKENIZED strings and empty strings not tokenized
358
+ if ((_parser_type == InvertedIndexParserType::PARSER_NONE &&
359
+ value.length () > ignore_above) ||
360
+ (_parser_type != InvertedIndexParserType::PARSER_NONE && value.empty ())) {
368
361
RETURN_IF_ERROR (add_null_document ());
369
362
} else {
370
363
new_fulltext_field (value.c_str (), value.length ());
0 commit comments