Skip to content

Commit

Permalink
fix rollup index
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Aug 18, 2020
1 parent 8be86a4 commit fcd423f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion x-pack/plugins/lens/public/indexpattern_datasource/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,23 @@ export async function loadIndexPatterns({

const indexPatternsObject = indexPatterns.reduce(
(acc, indexPattern) => {
const newFields = (indexPattern.fields as IndexPatternField[])
const newFields = indexPattern.fields
.filter(
(field) =>
!indexPatternsUtils.isNestedField(field) && (!!field.aggregatable || !!field.scripted)
)
.map(
(field): IndexPatternField => ({
name: field.name,
displayName: field.displayName,
type: field.type,
esTypes: field.esTypes,
aggregatable: field.aggregatable,
scripted: field.scripted,
searchable: field.searchable,
aggregationRestrictions: field.aggregationRestrictions,
})
)
.concat(documentField);

const { typeMeta } = indexPattern;
Expand Down

0 comments on commit fcd423f

Please sign in to comment.