max_analyzed_offset can not Limited OffsetSource.POSTINGS #86109
Labels
>enhancement
:Search Relevance/Highlighting
How a query matched a document
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Uh oh!
There was an error while loading. Please reload this page.
Description
In #67325 add
max_analyzed_offset
allows users to limit the highlighting of text fields.but when using
"index_options": "offsets"
in mappings, thismax_analyzed_offset
offset limit can not be limited, because it would useOffsetSource.ANALYSIS
andPostingsOffsetStrategy
to highlight field.Some tests can simply explain: link
When a string="Testing Fun Testing Fun" need to be highlight
Using
UnifiedHighlighter.OffsetSource.ANALYSIS
withqueryMaxAnalyzedOffset=10
would response:because in #67325 add
LimitTokenOffsetAnalyzer
BUT USING
UnifiedHighlighter.OffsetSource.POSTINGS
whichindex_options=offsets
withqueryMaxAnalyzedOffset=10
would response:because offset can not be limited by
LimitTokenOffsetAnalyzer
Proposal
may be can add a new
LimitedOffsetsEnum
to limit thisLink PR: #86110
The text was updated successfully, but these errors were encountered: