From b6c88a3bbc60138bcc5464691d06ab4d97b62a1b Mon Sep 17 00:00:00 2001 From: Matthew Bargar Date: Tue, 26 Jul 2016 19:08:50 -0400 Subject: [PATCH] Add new float support to console autocomplete Elasticsearch added a couple new data types, half_float and scaled_float, so we should include those in Console's autocomplete suggestions for mappings. Scaled_float also has a required parameter called scaling_factor, which we suggest a sensible default for when autocompleted. We talked about leaving the value empty, forcing the user to pick a value, but the autocompleter doesn't seem to support blank values. Fixes: https://github.com/elastic/kibana/issues/7811 Related: https://github.com/elastic/kibana/issues/7782 Former-commit-id: a413b5c85c9d05facde07c922fd97d3e186ab7d9 --- src/core_plugins/console/api_server/es_5_0/mappings.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core_plugins/console/api_server/es_5_0/mappings.js b/src/core_plugins/console/api_server/es_5_0/mappings.js index 054c62917ceb9..4bbfede64c5b9 100644 --- a/src/core_plugins/console/api_server/es_5_0/mappings.js +++ b/src/core_plugins/console/api_server/es_5_0/mappings.js @@ -81,7 +81,7 @@ module.exports = function (api) { 'properties': { '*': { type: { - __one_of: ['text', 'keyword', 'float', 'double', 'byte', 'short', 'integer', 'long', 'date', 'boolean', + __one_of: ['text', 'keyword', 'float', 'half_float', 'scaled_float', 'double', 'byte', 'short', 'integer', 'long', 'date', 'boolean', 'binary', 'object', 'nested', "geo_point", "geo_shape" ] }, @@ -111,6 +111,7 @@ module.exports = function (api) { // numeric precision_step: 4, ignore_malformed: BOOLEAN, + scaling_factor: 100, // geo_point lat_lon: {