Skip to content

Commit cce3abe

Browse files
committed
In the default templates, specify geoip.postal_code to be type 'keyword', to avoid incorrectly autodetecting as type 'date'.
1 parent 6017c26 commit cce3abe

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Diff for: lib/logstash/outputs/elasticsearch/elasticsearch-template-es2x.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686
"ip": { "type": "ip", "doc_values" : true },
8787
"location" : { "type" : "geo_point", "doc_values" : true },
8888
"latitude" : { "type" : "float", "doc_values" : true },
89-
"longitude" : { "type" : "float", "doc_values" : true }
89+
"longitude" : { "type" : "float", "doc_values" : true },
90+
"postal_code" : { "type" : "string", "not_analyzed" : true }
9091
}
9192
}
9293
}

Diff for: lib/logstash/outputs/elasticsearch/elasticsearch-template-es5x.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"ip": { "type": "ip" },
3838
"location" : { "type" : "geo_point" },
3939
"latitude" : { "type" : "half_float" },
40-
"longitude" : { "type" : "half_float" }
40+
"longitude" : { "type" : "half_float" },
41+
"postal_code" : { "type" : "keyword" }
4142
}
4243
}
4344
}

Diff for: lib/logstash/outputs/elasticsearch/elasticsearch-template-es6x.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"ip": { "type": "ip" },
3737
"location" : { "type" : "geo_point" },
3838
"latitude" : { "type" : "half_float" },
39-
"longitude" : { "type" : "half_float" }
39+
"longitude" : { "type" : "half_float" },
40+
"postal_code" : { "type" : "keyword" }
4041
}
4142
}
4243
}

Diff for: lib/logstash/outputs/elasticsearch/elasticsearch-template-es7x.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"ip": { "type": "ip" },
3838
"location" : { "type" : "geo_point" },
3939
"latitude" : { "type" : "half_float" },
40-
"longitude" : { "type" : "half_float" }
40+
"longitude" : { "type" : "half_float" },
41+
"postal_code" : { "type" : "keyword" }
4142
}
4243
}
4344
}

0 commit comments

Comments
 (0)