Skip to content

Commit

Permalink
Add wildcard type support to go code generator (elastic#1050)
Browse files Browse the repository at this point in the history
* add wildcard type support

* also add version and constant_keyword

* changelog
  • Loading branch information
ebeahan committed Oct 28, 2020
1 parent 5afd0a5 commit 9503b4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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

Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd/gocodegen/gocodegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func goDataType(fieldName, elasticsearchDataType string) string {
}

switch elasticsearchDataType {
case "keyword", "text", "ip", "geo_point":
case "keyword", "wildcard", "version", "constant_keyword", "text", "ip", "geo_point":
return "string"
case "long":
return "int64"
Expand Down

0 comments on commit 9503b4a

Please sign in to comment.