diff options
author | Tim Barron <tjbarron@google.com> | 2023-03-07 08:42:59 -0800 |
---|---|---|
committer | Tim Barron <tjbarron@google.com> | 2023-03-07 08:42:59 -0800 |
commit | 140aaee3e7b269f02599310e42d6172090ce02d2 (patch) | |
tree | 5fa21ad4c63ea0a436b650ba9de03735b518e01e /icing/result/snippet-retriever.cc | |
parent | 57993fa372564b1cc1310aa094da188efa76c7fa (diff) | |
parent | 53032446fec369125a6dc47c9f66435e4a62410b (diff) | |
download | icing-140aaee3e7b269f02599310e42d6172090ce02d2.tar.gz |
Merge remote-tracking branch 'goog/upstream-master' into androidx-platform-dev
* goog/upstream-master:
Update Icing from upstream.
Descriptions:
======================================================================
Refactor IndexProcessor
======================================================================
Rename Joinable Cache as Joinable Index
======================================================================
Implement Optimize and Clear for QualifiedIdTypeJoinableCache
======================================================================
Add JoinablePropertyMetadata reverse lookup
======================================================================
Allow code creating LanguageSegmenter::Iterators to declare AccessType
======================================================================
Further codifies the escape behavior in the parser test
======================================================================
Bug: 263890397
Bug: 268680462
Bug: 270102295
Change-Id: I8e45ef63c202aa83c0a4cda9c59b31d46daa4056
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 |