From 5d199aec3446e2374c24487a0c0ba98ec4e4ce6d Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Mon, 26 Oct 2020 14:20:30 -0500 Subject: [PATCH 1/3] add wildcard type support --- scripts/cmd/gocodegen/gocodegen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmd/gocodegen/gocodegen.go b/scripts/cmd/gocodegen/gocodegen.go index c202691ce0..451c56769b 100644 --- a/scripts/cmd/gocodegen/gocodegen.go +++ b/scripts/cmd/gocodegen/gocodegen.go @@ -274,7 +274,7 @@ func goDataType(fieldName, elasticsearchDataType string) string { } switch elasticsearchDataType { - case "keyword", "text", "ip", "geo_point": + case "keyword", "wildcard", "text", "ip", "geo_point": return "string" case "long": return "int64" From 87251cffbe85e5b571025b9456723ed9afccaffe Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Tue, 27 Oct 2020 15:18:35 -0500 Subject: [PATCH 2/3] also add version and constant_keyword --- scripts/cmd/gocodegen/gocodegen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmd/gocodegen/gocodegen.go b/scripts/cmd/gocodegen/gocodegen.go index 451c56769b..8fff5ed5d9 100644 --- a/scripts/cmd/gocodegen/gocodegen.go +++ b/scripts/cmd/gocodegen/gocodegen.go @@ -274,7 +274,7 @@ func goDataType(fieldName, elasticsearchDataType string) string { } switch elasticsearchDataType { - case "keyword", "wildcard", "text", "ip", "geo_point": + case "keyword", "wildcard", "version", "constant_keyword", "text", "ip", "geo_point": return "string" case "long": return "int64" From 41c00eda2e47c5509bbdef49797a142b347e30ba Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Tue, 27 Oct 2020 15:18:40 -0500 Subject: [PATCH 3/3] changelog --- CHANGELOG.next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index c53e8cf33b..a2797db16c 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -32,6 +32,7 @@ Thanks, you're awesome :-) --> * Added the `path` key when type is `alias`, to support the [alias field type](https://www.elastic.co/guide/en/elasticsearch/reference/current/alias.html). #877 * Added support for `scaled_float`'s mandatory parameter `scaling_factor`. #1042 * Added ability for --oss flag to fall back `constant_keyword` to `keyword`. #1046 +* Added support in the generated Go source go for `wildcard`, `version`, and `constant_keyword` data types. #1050 #### Improvements