Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Sense KB Additions for 1.2
Browse files Browse the repository at this point in the history
- Closes elastic#173 - Adding significant_terms to KB
- Closes elastic#172 - Adding percentiles to KB
- Closes elastic#171 - Adding cardinality agg to KB
- Closes elastic#176 - Removing custom_score and custom_boost_factor from query for 1.0
- Closes elastic#178 - Add script support to value_count agg
- Closes elastic#180 and Closes elastic#179 - Adding _cat/plugins and _cat/segments endpoints
- Closes elastic#191
  • Loading branch information
simianhacker committed Apr 28, 2014
1 parent 07d107f commit c204689
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 24 deletions.
46 changes: 42 additions & 4 deletions sense/app/kb/api_1_0/aggregations.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ define(function () {
"stats": simple_metric,
"extended_stats": simple_metric,
"value_count": {
__template: { field: ""},
field: "{field}"
__template: {
"field": ""
},
"field": "{field}",
"script": "_value",
"params": {},
"lang": "mvel"
},
"global": {},
"filter": {},
Expand Down Expand Up @@ -63,7 +68,19 @@ define(function () {
// TODO: these also support regex - extend!
"include": "*",
"exclude": "*",
"execution_hint": { __one_of: ["asc", "desc"] }
"execution_hint": { __one_of: ["map", "ordinals", "global_ordinals"] }
},
"significant_terms": {
__template: {
"field": ""
},
"field": "{field}",
"size": 10,
"shard_size": 10,
"min_doc_count": 10,
"include": "*",
"exclude": "*",
"execution_hint": { __one_of: ["map", "ordinals", "global_ordinals"] }
},
"range": {
__template: {
Expand Down Expand Up @@ -185,6 +202,27 @@ define(function () {
"precision": { __one_of: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]},
"size": 10,
"shard_size": 10
},
"percentiles": {
__template: {
"field": ""
},
"field": "{field}",
"percents": [],
"script": "_value",
"params": {},
"lang": "mvel",
"compression": 100
},
"cardinality": {
__template: {
"field": ""
},
"precision_threshold": 100,
"rehash": true,
"script": "_value",
"params": {},
"lang": "mvel"
}

}
Expand All @@ -195,4 +233,4 @@ define(function () {
api.addGlobalAutocompleteRules('aggs', rules);
};

});
});
4 changes: 3 additions & 1 deletion sense/app/kb/api_1_0/cat.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ define(["_"], function (_) {
addSimpleCat('_cat/recovery', api);
addSimpleCat('_cat/thread_pool', api);
addSimpleCat('_cat/shards', api);
addSimpleCat('_cat/plugins', api);
addSimpleCat('_cat/segments', api);
};
});
});
20 changes: 1 addition & 19 deletions sense/app/kb/api_1_0/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,6 @@ define(["_"], function (_) {
type: '',
values: []
},
custom_score: {
__template: {
query: {},
script: ''
},
query: {},
script: '',
params: {},
lang: 'mvel'
},
custom_boost_factor: {
__template: {
query: {},
boost_factor: 1.1
},
query: {},
boost_factor: 1.1
},
constant_score: {
__template: {
filter: {},
Expand Down Expand Up @@ -572,4 +554,4 @@ define(["_"], function (_) {
});
};

});
});

0 comments on commit c204689

Please sign in to comment.