-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Skip all geo point queries in plain highlighter #18495
Conversation
Geo queries and plain highlighter do not seem to work well together (https://issues.apache.org/jira/browse/LUCENE-7293) so we need to skip all geo related queries when we highlight. closes elastic#17537
LGTM. Highlighter is all hacks so another one won't hurt. Much. |
protected void extract(Query query, float boost, Map<String, WeightedSpanTerm> terms) throws IOException { | ||
// skip all geo queries, see https://issues.apache.org/jira/browse/LUCENE-7293 and | ||
// https://github.com/elastic/elasticsearch/issues/17537 | ||
if (query instanceof GeoPointInBBoxQuery == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also expose GeoPointDistanceQuery
or GeoPointInPolygonQuery
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, nevermind: both of those queries also subclass GeoPoinInBBoxQuery
, so this check is sufficient!
I left one comment, else LGTM. Thanks @brwe! |
LGTM too |
Geo queries and plain highlighter do not seem to work well
together (https://issues.apache.org/jira/browse/LUCENE-7293)
so we need to skip all geo related queries when we highlight.
hopefully closes #17537
Only plain highlighter seems to be affected.
I am worried that we might need to take care of GeoPointInBBoxQueryImpl too although I do not see how a rewritten query can be used for highlighting, see TODO below.
@nik9000 since this was your idea, maybe you want to take a look?