Skip to content

Add "did you mean" to unknown queries #51177

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 6 commits into from
Jan 20, 2020

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jan 17, 2020

This replaces the message we return for unknown queries with the standard
one that we use for unknown fields from ObjectParser. This is nice
because it includes "did you mean". One day we might convert parsing
queries to using object parser, but that looks complex. This change is
much smaller and seems useful.

This replaces the message we return for unknown queries with the standard
one that we use for unknown fields from `ObjectParser`. This is nice
because it includes "did you mean". One day we might convert parsing
queries to using object parser, but that looks complex. This change is
much smaller and seems useful.
@nik9000 nik9000 added >enhancement :Search/Search Search-related issues that do not fall into other categories v8.0.0 labels Jan 17, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@nik9000
Copy link
Member Author

nik9000 commented Jan 17, 2020

We had a comment that made a big deal about preserving the error message for unknown queries for backwards compatibility. I'm not actually sure that we offer backwards compatibility in error reporting at all though. At least for now I'm only targeting 8.0 with this. But it is a nice change so maybe it should hit 7.x too?

@nik9000 nik9000 requested a review from romseygeek January 17, 2020 18:32
@nik9000 nik9000 added the v7.7.0 label Jan 17, 2020
@nik9000
Copy link
Member Author

nik9000 commented Jan 17, 2020

I talked to @jasontedor and he thinks this is ok to backport. That is good enough for me.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @nik9000

@nik9000 nik9000 merged commit 73991da into elastic:master Jan 20, 2020
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Jan 21, 2020
This replaces the message we return for unknown queries with the standard
one that we use for unknown fields from `ObjectParser`. This is nice
because it includes "did you mean". One day we might convert parsing
queries to using object parser, but that looks complex. This change is
much smaller and seems useful.
nik9000 added a commit that referenced this pull request Jan 21, 2020
This replaces the message we return for unknown queries with the standard
one that we use for unknown fields from `ObjectParser`. This is nice
because it includes "did you mean". One day we might convert parsing
queries to using object parser, but that looks complex. This change is
much smaller and seems useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants