Skip to content

Commit

Permalink
[field caps] filter nested and object fields (#23658)
Browse files Browse the repository at this point in the history
* [field caps] filter nested and object fields

* update type list test

* update snapshots
  • Loading branch information
jbudz authored Oct 1, 2018
1 parent 1f38026 commit 6b3bc45
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,7 @@ export function readFieldCapsResponse(fieldCapsResponse) {
aggregatable: isAggregatable,
readFromDocValues: shouldReadFieldFromDocValues(isAggregatable, esType),
};
}).filter(field => {
return !['object', 'nested'].includes(field.type);
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/utils/__tests__/kbn_field_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ describe('utils/kbn_field_types', () => {
'geo_shape',
'ip',
'murmur3',
'nested',
'number',
'object',
'string',
'unknown',
]);
Expand Down
8 changes: 8 additions & 0 deletions src/utils/kbn_field_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 6b3bc45

Please sign in to comment.