[indexPatterns] add workaround for elastic/elasticsearch#20707

This commit is contained in:
spalger 2016-09-30 12:21:07 +02:00
parent f65c9b595b
commit 22c6f7c55c

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]);
});
});