Deprecated field [valueType] used, expected [value_type] instead (#32985) (#33287)

This commit is contained in:
Alexey Antonov 2019-03-15 11:39:21 +03:00 committed by GitHub
parent 17f2f23f11
commit cab952bb92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}
@ -58,8 +58,8 @@ const termsAgg = ({ field, size, direction, query }) => {
}
return {
'termsAgg': {
'terms': terms
termsAgg: {
terms: terms
}
};
};

View file

@ -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') {