diff --git a/sense/app/kb/api_1_0.js b/sense/app/kb/api_1_0.js index 2f7e8786b32ac..f951f896f3d64 100644 --- a/sense/app/kb/api_1_0.js +++ b/sense/app/kb/api_1_0.js @@ -3,6 +3,7 @@ define([ './api', './api_1_0/aliases', './api_1_0/aggregations', + './api_1_0/bench', './api_1_0/cat', './api_1_0/cluster', './api_1_0/document', @@ -56,4 +57,4 @@ define([ return Api_1_0; -}); \ No newline at end of file +}); diff --git a/sense/app/kb/api_1_0/aggregations.js b/sense/app/kb/api_1_0/aggregations.js index 9573c8ff14517..74f961540b895 100644 --- a/sense/app/kb/api_1_0/aggregations.js +++ b/sense/app/kb/api_1_0/aggregations.js @@ -174,7 +174,8 @@ define(function () { "factor": 1000, "pre_offset": "1d", "post_offset": "1d", - "format": "yyyy-MM-dd" + "format": "yyyy-MM-dd", + "time_zone": "00:00" }, "geo_distance": { __template: { diff --git a/sense/app/kb/api_1_0/aliases.js b/sense/app/kb/api_1_0/aliases.js index 59c381480be12..7d52cbd96b5ff 100644 --- a/sense/app/kb/api_1_0/aliases.js +++ b/sense/app/kb/api_1_0/aliases.js @@ -37,17 +37,20 @@ define(function () { "_aliases", ] }); + + var aliasRules = { + filter: {}, + routing: '1', + search_routing: '1,2', + index_routing: '1' + }; + api.addEndpointDescription('_post_alias', { methods: ["POST", "PUT"], patterns: [ "{indices}/_alias/{name}" ], - data_autocomplete_rules: { - filter: {}, - routing: '1', - search_routing: '1,2', - index_routing: '1' - } + data_autocomplete_rules: aliasRules }); api.addEndpointDescription('_delete_alias', { methods: ["DELETE"], @@ -64,5 +67,9 @@ define(function () { "_alias/{name}" ] }); + + api.addGlobalAutocompleteRules('aliases', { + '*': aliasRules + }); }; -}); \ No newline at end of file +}); diff --git a/sense/app/kb/api_1_0/bench.js b/sense/app/kb/api_1_0/bench.js new file mode 100644 index 0000000000000..5bf8f280d1176 --- /dev/null +++ b/sense/app/kb/api_1_0/bench.js @@ -0,0 +1,46 @@ +define(function () { + 'use strict'; + return function init(api) { + + + api.addEndpointDescription('_put_bench', { + methods: ['PUT'], + patterns: ['_bench'], + data_autocomplete_rules: { + name: '', + percentiles: [], + num_executor_nodes: 1, + competitors: [{ + __template: { + name: '', + requests: [{query:{}}] + }, + name: '', + requests: [ + { + __template: { + query: {} + }, + query: {} + } + ], + iterations: 5, + concurrency: 5, + multiplier: 1000, + warmup: { __one_of: [true, false] }, + num_slowset: 1, + search_type: { __one_of: ['query_then_fetch', 'dfs_query_then_fetch', 'count'] }, + clear_caches: { + filter: { __one_of: [true, false] }, + field_data: { __one_of: [true, false] }, + id: { __one_of: [true, false] }, + recycler: { __one_of: [true, false] }, + fields: ['{fields}'], + filter_keys: { __one_of: [true, false] } + }, + indices: ['{indices}'] + }] + } + }); + }; +}); diff --git a/sense/app/kb/api_1_0/indices.js b/sense/app/kb/api_1_0/indices.js index e45321722a44a..fe3354ac017d5 100644 --- a/sense/app/kb/api_1_0/indices.js +++ b/sense/app/kb/api_1_0/indices.js @@ -61,6 +61,13 @@ define(function () { }, settings: { __scope_link: '_put_settings.index' + }, + aliases: { + __template: { + "NAME": { + + } + } } } }); @@ -73,4 +80,4 @@ define(function () { }); }; -}); \ No newline at end of file +}); diff --git a/sense/app/kb/api_1_0/mappings.js b/sense/app/kb/api_1_0/mappings.js index ead3a352c6ca2..8ad1726bbbfd8 100644 --- a/sense/app/kb/api_1_0/mappings.js +++ b/sense/app/kb/api_1_0/mappings.js @@ -55,7 +55,7 @@ define(function () { '*': { type: { __one_of: ['string', 'float', 'double', 'byte', 'short', 'integer', 'long', 'date', 'boolean', - 'binary', 'object', 'nested', 'multi_field' + 'binary', 'object', 'nested' ] }, @@ -138,7 +138,8 @@ define(function () { '*': { __scope_link: '_put_mapping.type.properties.field' } - } + }, + copy_to: { __one_of: ['{field}', ['{field}']] } } } } @@ -157,4 +158,4 @@ define(function () { }); }; -}); \ No newline at end of file +}); diff --git a/sense/app/kb/api_1_0/query.js b/sense/app/kb/api_1_0/query.js index e3925f7332e53..d34f5fe826dd5 100644 --- a/sense/app/kb/api_1_0/query.js +++ b/sense/app/kb/api_1_0/query.js @@ -116,7 +116,8 @@ define(["_"], function (_) { __template: true, __one_of: [true, false] }, - tie_breaker: 0.0 + tie_breaker: 0.0, + type: { __one_of: ['best_fields', 'most_fields', 'cross_fields', 'phrase', 'phrase_prefix'] } }, bool: { must: [ diff --git a/sense/app/kb/api_1_0/search.js b/sense/app/kb/api_1_0/search.js index 27e04bcbcf885..1693e3e70e6c5 100644 --- a/sense/app/kb/api_1_0/search.js +++ b/sense/app/kb/api_1_0/search.js @@ -115,6 +115,24 @@ define(function () { } }); + + api.addEndpointDescription('_search_template', { + methods: ['GET'], + patterns: ['_search/template'], + data_autocomplete_rules: { + template: { + __template: { + "query": {} + } + }, + query: { + + }, + params: { + + } + } + }); }; -}); \ No newline at end of file +});