[Lens] Fix the composite runtimefields description (#127467)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Stratoula Kalafateli 2022-03-16 20:31:09 +02:00 committed by GitHub
parent bbddc4233b
commit 8540fa9c68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,14 +80,7 @@ export async function initFieldsRoute(setup: CoreSetup<PluginStartContract>) {
},
};
const runtimeMappings = indexPattern.fields
.filter((f) => f.runtimeField)
.reduce((acc, f) => {
if (!f.runtimeField) return acc;
// @ts-expect-error The MappingRuntimeField from @elastic/elasticsearch does not expose the "composite" runtime type yet
acc[f.name] = f.runtimeField;
return acc;
}, {} as Record<string, estypes.MappingRuntimeField>);
const runtimeMappings = indexPattern.getRuntimeMappings();
const search = async (aggs: Record<string, estypes.AggregationsAggregationContainer>) => {
const result = await requestClient.search({