-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Elasticsearch version: 2.2.0
JVM version: Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
OS version: OSX 10.11.1
Description of the problem including expected versus actual behavior:
If you enable both date_detection: true and index: not_analyzed in a dynamic template, dates are not detected.
Steps to reproduce:
- Create a template with a PUT to
_template/reproducebugand the following body (date_detection: trueandindex:not_analyzed):
{
"template": "*",
"mappings": {
"_default_": {
"date_detection": true,
"_all": {
"enabled": false
},
"dynamic_templates": [
{
"template1": {
"mapping": {
"index": "not_analyzed",
"type": "{dynamic_type}"
},
"match": "*"
}
}
],
"properties": {
"msg": {
"type": "string",
"index": "analyzed"
}
}
}
}
}
- Index the following document, that contains a ISO8601 date:
{"foo":"bar", "time":"2016-03-08T09:52:09.097Z"} - Check that the field time is indexed as a not_analyzed string.
Provide logs (if relevant):
No relevant logs.
Metadata
Metadata
Assignees
Labels
No labels