Skip to content

Commit

Permalink
Deprecated field [valueType] used, expected [value_type] instead (ela…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Mar 15, 2019
1 parent 01e0a95 commit b32123a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -48,7 +48,7 @@ const termsAgg = ({ field, size, direction, query }) => {
source: field.script,
lang: field.lang
};
terms.valueType = field.type === 'number' ? 'float' : field.type;
terms.value_type = field.type === 'number' ? 'float' : field.type;
} else {
terms.field = field.name;
}
Expand All @@ -58,8 +58,8 @@ const termsAgg = ({ field, size, direction, query }) => {
}

return {
'termsAgg': {
'terms': terms
termsAgg: {
terms: terms
}
};
};
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/agg_types/buckets/terms.js
Expand Up @@ -233,7 +233,7 @@ export const termsBucketAgg = new BucketAggType({
// thus causing issues with filtering. This probably causes other issues since float might not
// be able to contain the number on the elasticsearch side
if (output.params.script) {
output.params.valueType = agg.getField().type === 'number' ? 'float' : agg.getField().type;
output.params.value_type = agg.getField().type === 'number' ? 'float' : agg.getField().type;
}

if (agg.params.missingBucket && agg.params.field.type === 'string') {
Expand Down

0 comments on commit b32123a

Please sign in to comment.