From 4c1a374a9ee266884bd33e8a3b3f52fcef8f4019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wieland=20Sch=C3=B6bl?= Date: Tue, 12 Nov 2019 16:36:43 +0100 Subject: [PATCH] fix: use .raw field for aggregations --- src/mapping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapping.ts b/src/mapping.ts index e6c3d5ac..1af79d29 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -410,7 +410,7 @@ function addAggregatable(path: string, topTypeName: string, global: boolean) { (aggregations[global ? '@all' : topTypeName] as ESNestedAggregation).aggs[property] = { terms: { - field: `${property}.keyword`, + field: `${property}.raw`, size: 1000, }, };