diff --git a/src/core_plugins/console/api_server/es_5_0/aggregations.js b/src/core_plugins/console/api_server/es_5_0/aggregations.js index e9b89dea15e60..5dbd0ee21b8ac 100644 --- a/src/core_plugins/console/api_server/es_5_0/aggregations.js +++ b/src/core_plugins/console/api_server/es_5_0/aggregations.js @@ -332,7 +332,7 @@ var rules = { script_fields: { __scope_link: "_search.script_fields" }, - fielddata_fields: ["{field}"], + docvalue_fields: ["{field}"], version: {__one_of: [true, false]} }, "percentile_ranks": { diff --git a/src/core_plugins/console/api_server/es_5_0/indices.js b/src/core_plugins/console/api_server/es_5_0/indices.js index 9e2d318116802..f65ee3d2fcc22 100644 --- a/src/core_plugins/console/api_server/es_5_0/indices.js +++ b/src/core_plugins/console/api_server/es_5_0/indices.js @@ -60,7 +60,7 @@ module.exports = function (api) { "fields": [], "types": [], "completion_fields": [], - "fielddata_fields": [], + "docvalue_fields": [], "level": ["cluster", "indices", "shards"] } diff --git a/src/core_plugins/console/api_server/es_5_0/search.js b/src/core_plugins/console/api_server/es_5_0/search.js index dda530f6e904d..db5efcf6b24ec 100644 --- a/src/core_plugins/console/api_server/es_5_0/search.js +++ b/src/core_plugins/console/api_server/es_5_0/search.js @@ -121,7 +121,6 @@ module.exports = function (api) { ] }, stored_fields: ['{field}'], - fielddata_fields: ["{field}"], docvalue_fields: ["{field}"], script_fields: { __template: { diff --git a/src/core_plugins/elasticsearch/lib/__tests__/routes.js b/src/core_plugins/elasticsearch/lib/__tests__/routes.js index 845b34517a06a..b70531bc6cffb 100644 --- a/src/core_plugins/elasticsearch/lib/__tests__/routes.js +++ b/src/core_plugins/elasticsearch/lib/__tests__/routes.js @@ -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}}}},"stored_fields":["*"],"_source": true,"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": true,"script_fields":{},"docvalue_fields":["timestamp_offset","@timestamp","utc_time"]}\n' // eslint-disable-line max-len }); }); diff --git a/src/core_plugins/kibana/public/doc/controllers/doc.js b/src/core_plugins/kibana/public/doc/controllers/doc.js index 97be464e705d1..805aae832f02b 100644 --- a/src/core_plugins/kibana/public/doc/controllers/doc.js +++ b/src/core_plugins/kibana/public/doc/controllers/doc.js @@ -53,7 +53,7 @@ app.controller('doc', function ($scope, $route, es, timefilter) { stored_fields: computedFields.storedFields, _source: computedFields._source, script_fields: computedFields.scriptFields, - fielddata_fields: computedFields.fielddataFields + docvalue_fields: computedFields.docvalueFields } }).then(function (resp) { if (resp.hits) { diff --git a/src/ui/public/courier/data_source/_abstract.js b/src/ui/public/courier/data_source/_abstract.js index f2b4eab941af0..4829ef661944a 100644 --- a/src/ui/public/courier/data_source/_abstract.js +++ b/src/ui/public/courier/data_source/_abstract.js @@ -287,10 +287,10 @@ export default function SourceAbstractFactory(Private, Promise, PromiseEmitter) flatState.body.stored_fields = computedFields.storedFields; flatState.body._source = computedFields._source; flatState.body.script_fields = flatState.body.script_fields || {}; - flatState.body.fielddata_fields = flatState.body.fielddata_fields || []; + flatState.body.docvalue_fields = flatState.body.docvalue_fields || []; _.extend(flatState.body.script_fields, computedFields.scriptFields); - flatState.body.fielddata_fields = _.union(flatState.body.fielddata_fields, computedFields.fielddataFields); + flatState.body.docvalue_fields = _.union(flatState.body.docvalue_fields, computedFields.docvalueFields); } decorateQuery(flatState.body.query); diff --git a/src/ui/public/index_patterns/__tests__/_get_computed_fields.js b/src/ui/public/index_patterns/__tests__/_get_computed_fields.js index d63cb0358a32d..ae0da4e11978d 100644 --- a/src/ui/public/index_patterns/__tests__/_get_computed_fields.js +++ b/src/ui/public/index_patterns/__tests__/_get_computed_fields.js @@ -30,9 +30,9 @@ describe('get computed fields', function () { expect(fn()._source).to.be(true); }); - it('should request date fields as fielddata_fields', function () { - expect(fn().fielddataFields).to.contain('@timestamp'); - expect(fn().fielddataFields).to.not.include.keys('bytes'); + it('should request date fields as docvalue_fields', function () { + expect(fn().docvalueFields).to.contain('@timestamp'); + expect(fn().docvalueFields).to.not.include.keys('bytes'); }); diff --git a/src/ui/public/index_patterns/_get_computed_fields.js b/src/ui/public/index_patterns/_get_computed_fields.js index 5518ec24c789a..8730183a60066 100644 --- a/src/ui/public/index_patterns/_get_computed_fields.js +++ b/src/ui/public/index_patterns/_get_computed_fields.js @@ -4,9 +4,9 @@ import _ from 'lodash'; export default function () { let self = this; let scriptFields = {}; - let fielddataFields = []; + let docvalueFields = []; - fielddataFields = _.pluck(self.fields.byType.date, 'name'); + docvalueFields = _.pluck(self.fields.byType.date, 'name'); _.each(self.getScriptedFields(), function (field) { scriptFields[field.name] = { @@ -21,7 +21,7 @@ export default function () { storedFields: ['*'], _source: true, scriptFields: scriptFields, - fielddataFields: fielddataFields + docvalueFields: docvalueFields }; };