[field caps] filter nested and object fields (#23658)

* [field caps] filter nested and object fields

* update type list test

* update snapshots
This commit is contained in:
Jonathan Budzenski 2018-10-01 16:15:22 -05:00 committed by GitHub
parent 1f38026731
commit 6b3bc45b9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View file

@ -120,5 +120,7 @@ export function readFieldCapsResponse(fieldCapsResponse) {
aggregatable: isAggregatable,
readFromDocValues: shouldReadFieldFromDocValues(isAggregatable, esType),
};
}).filter(field => {
return !['object', 'nested'].includes(field.type);
});
}

View file

@ -922,6 +922,14 @@ exports[`FieldEditor should show deprecated lang warning 1`] = `
"text": "geo_point",
"value": "geo_point",
},
Object {
"text": "object",
"value": "object",
},
Object {
"text": "nested",
"value": "nested",
},
Object {
"text": "geo_shape",
"value": "geo_shape",

View file

@ -100,7 +100,9 @@ describe('utils/kbn_field_types', () => {
'geo_shape',
'ip',
'murmur3',
'nested',
'number',
'object',
'string',
'unknown',
]);

View file

@ -71,6 +71,14 @@ export const KBN_FIELD_TYPES = [
name: 'geo_point',
esTypes: ['geo_point'],
}),
new KbnFieldType({
name: 'object',
esTypes: ['object'],
}),
new KbnFieldType({
name: 'nested',
esTypes: ['nested'],
}),
new KbnFieldType({
name: 'geo_shape',
esTypes: ['geo_shape'],