Skip to content

Handle specialized term queries in MappedFieldType.extractTerm(Query) #21889

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

Merged
merged 1 commit into from
Nov 30, 2016
Merged

Handle specialized term queries in MappedFieldType.extractTerm(Query) #21889

merged 1 commit into from
Nov 30, 2016

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Nov 30, 2016

For some fields we have a specialized implementation of a TermQuery that is specific for the field.
When these kind of fields are used in a wildcard query or a span term query it fails with an exception because they don't recognize the specialized form.
The impacted fields are [_all] and [_type] and the impacted queries are [span_term] and [wilcard].
This change handles these forms and correctly extracts the term inside them for further use.

Fixes #21882

…ery)

For some fields we have a specialized implementation of a TermQuery that is specific for the field.
When these kind of fields are used in a wildcard query or a span term query it fails with an exception because they don't recognize the specialized form.
The impacted fields are [_all] and [_type] and the impacted queries are [span_term] and [wilcard].
This change handles these forms and correctly extracts the term inside them for further use.

Fixes #21882
@jimczi jimczi added :Search/Search Search-related issues that do not fall into other categories >regression v5.2.0 v6.0.0-alpha1 labels Nov 30, 2016
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jimczi !

@sboyd
Copy link

sboyd commented Nov 30, 2016

I just ran into this issue as well. Thanks for addressing it.
Any idea when this fix will be available?
Thanks --Steve

@jimczi jimczi merged commit fc9b638 into elastic:master Nov 30, 2016
@jimczi jimczi deleted the term_query_extract branch November 30, 2016 22:11
jimczi added a commit that referenced this pull request Nov 30, 2016
…ery) (#21889)

For some fields we have a specialized implementation of a TermQuery that is specific for the field.
When these kind of fields are used in a wildcard query or a span term query it fails with an exception because they don't recognize the specialized form.
The impacted fields are [_all] and [_type] and the impacted queries are [span_term] and [wilcard].
This change handles these forms and correctly extracts the term inside them for further use.

Fixes #21882
@jimczi jimczi added the v5.1.1 label Nov 30, 2016
jimczi added a commit that referenced this pull request Nov 30, 2016
…ery) (#21889)

For some fields we have a specialized implementation of a TermQuery that is specific for the field.
When these kind of fields are used in a wildcard query or a span term query it fails with an exception because they don't recognize the specialized form.
The impacted fields are [_all] and [_type] and the impacted queries are [span_term] and [wilcard].
This change handles these forms and correctly extracts the term inside them for further use.

Fixes #21882
@jimczi jimczi added the v5.0.3 label Nov 30, 2016
jimczi added a commit that referenced this pull request Nov 30, 2016
…ery) (#21889)

For some fields we have a specialized implementation of a TermQuery that is specific for the field.
When these kind of fields are used in a wildcard query or a span term query it fails with an exception because they don't recognize the specialized form.
The impacted fields are [_all] and [_type] and the impacted queries are [span_term] and [wilcard].
This change handles these forms and correctly extracts the term inside them for further use.

Fixes #21882
@jimczi
Copy link
Contributor Author

jimczi commented Nov 30, 2016

And merged in all 5 branches + master
Thanks @jpountz .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>regression :Search/Search Search-related issues that do not fall into other categories v5.0.3 v5.1.1 v5.2.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants