diff options
Diffstat (limited to 'icing/result/snippet-retriever.cc')
-rw-r--r-- | icing/result/snippet-retriever.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/icing/result/snippet-retriever.cc b/icing/result/snippet-retriever.cc index 1176eaf..a94775d 100644 --- a/icing/result/snippet-retriever.cc +++ b/icing/result/snippet-retriever.cc @@ -488,7 +488,10 @@ void GetEntriesFromProperty(const PropertyProto* current_property, current_property->string_values_size(), /*index=*/i, property_path)); std::string_view value = current_property->string_values(i); std::unique_ptr<Tokenizer::Iterator> iterator = - tokenizer->Tokenize(value).ValueOrDie(); + tokenizer + ->Tokenize(value, + LanguageSegmenter::AccessType::kBidirectionalIterator) + .ValueOrDie(); // All iterators are moved through positions sequentially. Constructing them // each time resets them to the beginning of the string. This means that, // for t tokens and in a string of n chars, each MoveToUtf8 call from the |