-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighters should reject ignored keyword field early #43800
Labels
>enhancement
:Search Relevance/Highlighting
How a query matched a document
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Comments
jimczi
added
>enhancement
:Search Relevance/Highlighting
How a query matched a document
labels
Jul 1, 2019
Pinging @elastic/es-search |
Related proposal: #52155 (comment) to introduce |
mayya-sharipova
added a commit
to mayya-sharipova/elasticsearch
that referenced
this issue
Mar 11, 2020
Keyword field values with length more than ignore_above are not indexed. But highlighters still were retrieving these values from _source and were trying to highlight them. This sometimes lead to errors if a field length exceeded max_analyzed_offset. But also this is a wrong behaviour to attempt to highlight something that was not ignored during indexing. This PR checks if a keyword value was ignored because of its length, and if yes, skips highlighting it. Closes elastic#43800
mayya-sharipova
added a commit
that referenced
this issue
Mar 16, 2020
Keyword field values with length more than ignore_above are not indexed. But highlighters still were retrieving these values from _source and were trying to highlight them. This sometimes lead to errors if a field length exceeded max_analyzed_offset. But also this is a wrong behaviour to attempt to highlight something that was not ignored during indexing. This PR checks if a keyword value was ignored because of its length, and if yes, skips highlighting it. Closes #43800
mayya-sharipova
added a commit
to mayya-sharipova/elasticsearch
that referenced
this issue
Mar 16, 2020
Keyword field values with length more than ignore_above are not indexed. But highlighters still were retrieving these values from _source and were trying to highlight them. This sometimes lead to errors if a field length exceeded max_analyzed_offset. But also this is an overall wrong behaviour to attempt to highlight something that was ignored during indexing. This PR checks if a keyword value was ignored because of its length, and if yes, skips highlighting it. Closes elastic#43800
mayya-sharipova
added a commit
that referenced
this issue
Mar 16, 2020
Keyword field values with length more than ignore_above are not indexed. But highlighters still were retrieving these values from _source and were trying to highlight them. This sometimes lead to errors if a field length exceeded max_analyzed_offset. But also this is an overall wrong behaviour to attempt to highlight something that was ignored during indexing. This PR checks if a keyword value was ignored because of its length, and if yes, skips highlighting it. Backport: #53408 Closes #43800
38 tasks
javanna
added
the
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
label
Jul 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>enhancement
:Search Relevance/Highlighting
How a query matched a document
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Highlighters are able to handle
text
andkeyword
field by reanalyzing their content at search time. However they don't check if the field was ignored at search time due to theignore_above
option. For instance akeyword
field that is greater than theignore_above
option would skip indexing but if it is set in an highlighter option, the content will be extracted from_source
and reanalyzed (ignoringignore_above
option). We should check theignore_above
option at highlighting time in order to avoid hitting thehighlight.max_analyzed_offset
on a field that was ignored at index time.The text was updated successfully, but these errors were encountered: