I'm using elasticsearch with data that have string-field with date values, like this:
"2016-01-25 18:40:18.933"
I'm trying to use range filter for getting values from date to date. For example:
"query" : {
"filtered" : {
"query" : {
"range" : {
"createdDate" : {
"gte": "2015-11-01",
"lte": "2016-01-25"
}
}
}
}
}
}
But results doesn't contain values with "createdDate": "2015-12-14 20:28:23.557"
If I use "gte": "2015" or "gte": "2014-12-31", then values with "createdDate": "2015-12-14" will be included in the results.
What's wrong in my query?
createdDatefield?curl -XGET localhost:9200/index/_mapping{ "documents": { "mappings": { "order": { "properties": { ... "createdDate": { "type": "string" }