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

Commit

Permalink
Merge pull request #18 from martijnvg/field_stats_api
Browse files Browse the repository at this point in the history
Added support for the field stats api
  • Loading branch information
martijnvg committed Sep 18, 2015
2 parents c54098d + fb283bd commit 91ffb5e
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/webpackShims/kb/api_2_0.js
Expand Up @@ -26,6 +26,7 @@ define([
'./api_2_0/cluster',
'./api_2_0/count',
'./api_2_0/document',
'./api_2_0/field_stats',
'./api_2_0/filter',
'./api_2_0/nodes',
'./api_2_0/globals',
Expand Down
67 changes: 67 additions & 0 deletions public/webpackShims/kb/api_2_0/field_stats.js
@@ -0,0 +1,67 @@
/**
* ELASTICSEARCH CONFIDENTIAL
* _____________________________
*
* [2014] Elasticsearch Incorporated All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Elasticsearch Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Elasticsearch Incorporated
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Elasticsearch Incorporated.
*/

define(function () {
'use strict';
return function init(api) {
api.addEndpointDescription('_field_stats', {
methods: ['GET', 'POST'],
patterns: [
"_field_stats",
"{indices}/_field_stats"
],
url_params: {
fields: [],
level: ["cluster", "indices"],
ignore_unavailable: ["true", "false"],
allow_no_indices: [false, true],
expand_wildcards: ["open", "closed", "none", "all"]
},
data_autocomplete_rules: {
fields: [
"{field}",
],
index_constraints : {
"{field}" : {
min_value : {
gt : "MIN",
gte : "MAX",
lt: "MIN",
lte: "MAX"
},
max_value : {
gt : "MIN",
gte : "MAX",
lt: "MIN",
lte: "MAX"
}
},
__template : {
"FIELD" : {
min_value : {
gt : "MIN"
},
max_value : {
lt: "MAX"
}
}
}
}
}
});
};
});

0 comments on commit 91ffb5e

Please sign in to comment.