@@ -295,12 +295,15 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
295
295
" field or index writer is null in inverted index writer" );
296
296
}
297
297
auto * v = (Slice*)values;
298
+ auto ignore_above_value =
299
+ get_parser_ignore_above_value_from_properties (_index_meta->properties ());
300
+ auto ignore_above = std::stoi (ignore_above_value);
298
301
for (int i = 0 ; i < count; ++i) {
299
- auto ignore_above_value =
300
- get_parser_ignore_above_value_from_properties (_index_meta-> properties ());
301
- auto ignore_above = std::stoi (ignore_above_value);
302
- if (v-> get_size () > ignore_above) {
303
- VLOG_DEBUG << " fulltext index value length can be at most 256 , but got "
302
+ // only ignore_above UNTOKENIZED strings
303
+ if (_parser_type == InvertedIndexParserType::PARSER_NONE &&
304
+ v-> get_size () > ignore_above) {
305
+ VLOG_DEBUG << " fulltext index value length can be at most "
306
+ << ignore_above_value << " , but got "
304
307
<< " value length:" << v->get_size () << " , ignore this value" ;
305
308
new_fulltext_field (empty_value.c_str (), 0 );
306
309
RETURN_IF_ERROR (add_null_document ());
@@ -330,6 +333,9 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
330
333
return Status::InternalError (
331
334
" field or index writer is null in inverted index writer" );
332
335
}
336
+ auto ignore_above_value =
337
+ get_parser_ignore_above_value_from_properties (_index_meta->properties ());
338
+ auto ignore_above = std::stoi (ignore_above_value);
333
339
for (int i = 0 ; i < count; ++i) {
334
340
// offsets[i+1] is now row element count
335
341
std::vector<std::string> strings;
@@ -346,11 +352,11 @@ class InvertedIndexColumnWriterImpl : public InvertedIndexColumnWriter {
346
352
}
347
353
348
354
auto value = join (strings, " " );
349
- auto ignore_above_value =
350
- get_parser_ignore_above_value_from_properties (_index_meta-> properties ());
351
- auto ignore_above = std::stoi (ignore_above_value);
352
- if ( value. length () > ignore_above) {
353
- VLOG_DEBUG << " fulltext index value length can be at most 256 , but got "
355
+ // only ignore_above UNTOKENIZED strings
356
+ if (_parser_type == InvertedIndexParserType::PARSER_NONE &&
357
+ value. length () > ignore_above) {
358
+ VLOG_DEBUG << " fulltext index value length can be at most "
359
+ << ignore_above_value << " , but got "
354
360
<< " value length:" << value.length () << " , ignore this value" ;
355
361
new_fulltext_field (empty_value.c_str (), 0 );
356
362
RETURN_IF_ERROR (add_null_document ());
0 commit comments