-
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
Remove highlight query #13231
Remove highlight query #13231
Conversation
@Bargs and @weltenwort, could you give me your thoughts on this PR vs. #13185? Thanks! |
I'm all for this change. The more I think about it the more I like it. It removes a lot of complexity from the code. It makes Kibana more consistent (the default_field will always be The only scenario I can think of where #13185 has an advantage is if the user has a mix of indices with and without |
This definitely looks better. But I don't feel I understand the reason why this is suddenly a viable option. I guess |
@weltenwort It's only a viable option for 6.x because it's technically a breaking change. We didn't want to break anything for 5.x which is why we went with a |
That makes sense, thank you. IMHO we should take any chance we can find to get rid of such workarounds. 👍 |
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.
Functionality looks good.
I think we can remove all the code related to the highlightAll param on the SearchSource as well can't we?
if (flatState.highlightAll != null) { |
'highlightAll', |
Once nice thing about the |
Ah I'm remembering now, we needed |
jenkins, test this |
* Change use of all_fields in highlight_query to default_field * Remove highlight query and option * Fix tests * Remove unused setting * Remove lingering references to all_fields
* Change use of all_fields in highlight_query to default_field * Remove highlight query and option * Fix tests * Remove unused setting * Remove lingering references to all_fields
Fixes #13096.
Replaces #13185.
This PR changes the behavior of highlighting. Instead of using a separate
highlight_query
with"all_fields": true
or"default_field": "*"
, this adds another parameter to the default query string parameters:"default_field": "*"
.This should keep the highlighting behavior we desire without all the extra logic of adding the
highlight_query
to the request.As a result of this change, anyone who has modified the existing advanced setting,
query:queryString:options
, will have to update it to include this parameter if they want highlighting to work across all fields. Also, anyone who has adefault_field
set in their index will have to update the advanced setting and remove thedefault_field
parameter.See #9671 for the original PR that added the
highlight_query
behavior.