-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Use default_field in highlight_query instead of all_fields #13185
Conversation
There may be a bug in ES, or Here's what my highlight query looked like:
|
I also had another related thought. I wonder if we should take the opportunity here to set Am I missing any reason why we wouldn't want to do that? |
@Bargs That's a good point. It would be a breaking change for 6.0 since some users would have to update the setting as you mentioned, but I think it would be super nice to get rid of this code anyway. It all feels pretty hacky to me. |
There are two kinds of users that might have to update their advanced settings if we do that: Those who have a |
I suppose that's true, yeah. |
@lukasolson I re-tested with a build of the most recent commit in ES master and I can no longer reproduce that error, so perhaps it was a bug that's already been fixed. This LGTM. If you want we could merge this as-is to avoid spamming users' deprecation logs and consider removal as a separate issue. |
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.
Seems to work as expected against elastic/elasticsearch@315319b.
Fixes #13096.
This PR changes the behavior of highlighting to use
"default_field": "*"
instead of"all_fields": true
.See #9671 for the original PR.