-
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
Rename 'fields' property to 'stored_fields' in routes.js test to adhere to new ES msearch API. #7542
Rename 'fields' property to 'stored_fields' in routes.js test to adhere to new ES msearch API. #7542
Conversation
@cjcenizal Thanks for creating this PR. I suspect this change is needed in several other places as well. I'm not sure of the extent but it probably makes sense to group the same change (in several places) into this PR. P.S. I realize there is a build failure for an unrelated, different ES change with |
Looks like this is causing an issue in Kibana itself as well #7541 |
This is going to require/be dependent on a new elasticsearch client library publish. |
@@ -105,7 +105,7 @@ describe('plugins/elasticsearch', function () { | |||
testRoute({ | |||
method: 'POST', | |||
url: '/elasticsearch/_msearch?timeout=0&ignore_unavailable=true&preference=1429577952339', | |||
payload: '{"index":"logstash-2015.04.21","ignore_unavailable":true}\n{"size":500,"sort":{"@timestamp":"desc"},"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"bool":{"must":[{"range":{"@timestamp":{"gte":1429577068175,"lte":1429577968175}}}],"must_not":[]}}],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30s","min_doc_count":0,"extended_bounds":{"min":1429577068175,"max":1429577968175}}}},"fields":["*","_source"],"script_fields":{},"fielddata_fields":["timestamp_offset","@timestamp","utc_time"]}\n' // eslint-disable-line max-len | |||
payload: '{"index":"logstash-2015.04.21","ignore_unavailable":true}\n{"size":500,"sort":{"@timestamp":"desc"},"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"bool":{"must":[{"range":{"@timestamp":{"gte":1429577068175,"lte":1429577968175}}}],"must_not":[]}}],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30s","min_doc_count":0,"extended_bounds":{"min":1429577068175,"max":1429577968175}}}},"stored_fields":["*","_source"],"script_fields":{},"fielddata_fields":["timestamp_offset","@timestamp","utc_time"]}\n' // eslint-disable-line max-len |
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.
what's the point in having stored_fields: [ "*", "_source"]
? we can just leave out this parameter
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.
Per Zoom discussion, we'll make a list of all the places this type of reference exists, and then make a separate PR for removing them. CC @jbudz
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.
If you want to return the source regardless, then use "_source": true
, so to return all stored fields AND the source, use:
"stored_fields": "*",
"_source": true
indeed... so far I also found: |
#7546 should fix the functional tests _timestamp issue |
5f6deea
to
0b02e38
Compare
7ee3e42
to
82980d2
Compare
jenkins, test it |
@@ -77,7 +77,7 @@ modules.get('apps/management') | |||
_.defaults(this.indexPattern, { | |||
id: this.patternInput.defaultValue, | |||
title: 'filebeat-*', | |||
fields: _(sampleFields) | |||
stored_fields: _(sampleFields) |
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.
apologies, this one should still be fields
685ef4c
to
1169670
Compare
LGTM |
@@ -69,7 +69,7 @@ module.service('savedDashboards', function (Promise, SavedDashboard, kbnIndex, e | |||
query: { | |||
simple_query_string: { | |||
query: searchString + '*', | |||
fields: ['title^3', 'description'], | |||
stored_fields: ['title^3', 'description'], |
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.
hmm... afaik we didn't change the simple_query_string query... are you sure this is working?
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 dubious - we search indexed fields not stored ones so either way is odd naming.
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.
This should definitely be fields
, not stored_fields
TODO: We can merge this after elasticsearch un-reverts their "fields -> stored_fields" change. Then we can squash these commits, and rebase master onto this branch to bring everything up to date. Then we should be good to merge. |
Merging this would happen after all of those things :) |
Note: the "fields -> stored_fields" change has been unreverted in ES: elastic/elasticsearch@afe99fc |
dd0c399
to
7cbea3f
Compare
7cbea3f
to
3c71b6e
Compare
…ch API. - Upgrade elasticsearch client to 12.0.0-rc4.
3c71b6e
to
d9cf54f
Compare
rebase LGTM |
I'm seeing an issue in the doc viewer in the Discover view. If I expand on one of the rows, both the Table and JSON tabs are empty: There are no errors in the developer console. I'm not entirely sure this issue is a result of the changes in this PR. Unfortunately |
@ycombinator you'll want to use es master for this, this should fix the break |
@jbudz I am using ES master, specifically this commit SHA: elastic/elasticsearch@dec620c |
Ah I misunderstood, got it. |
BTW, just confirmed that Kibana 5.0.0-alpha4 does not show the empty table or JSON issue I reported in #7542 (comment). |
Opened #7628 |
Thanks @jbudz. Given that the issue I reported is unrelated to this PR, I'll continue reviewing this PR. |
LGTM. |
…d-fields Rename 'fields' property to 'stored_fields' in routes.js test to adhere to new ES msearch API. Former-commit-id: 5588983
Issues addressed:
esvm:test
:@ycombinator identified this change to ES as the culprit: elastic/elasticsearch@2f46f53