Merge pull request #8503 from elastic/jasper/backport/8500/5.0

[backport] PR #8500 to 5.0 - Force aggregatable geo_points
This commit is contained in:
Court Ewing 2016-09-30 13:16:31 +02:00 committed by GitHub
commit cf14cfcd9c
2 changed files with 10 additions and 1 deletions

View file

@ -9,6 +9,14 @@ export default function ($http) {
const stats = _.get(res, 'data.fields', {});
return _.map(fields, (field) => {
if (field.type === 'geo_point' && !stats[field.name]) {
// FIXME: remove once https://github.com/elastic/elasticsearch/issues/20707 is fixed
return _.assign(field, {
'searchable': true,
'aggregatable': true
});
}
return _.assign(field, stats[field.name]);
});
});

View file

@ -52,8 +52,9 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
'name',
'type',
'format',
'searchable',
'aggregatable',
'analyzed',
'indexed',
'controls'
];