Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[field caps] filter nested and object fields #23658

Merged
merged 3 commits into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'],
}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle join type?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looks like join was not implemented in the ES change.

new KbnFieldType({
name: 'geo_shape',
esTypes: ['geo_shape'],
Expand Down