This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from martijnvg/field_stats_api
Added support for the field stats api
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
}; | ||
}); |