Hi, I am trying to do a query where the timestamp is 27/Feb/2018. The Elasticsearch version is 1.5
My query looks like this
{
"query": {
"multi_match": {
"query": "27/Feb/2018",
"fields": [ "timestamp"],
"minimum_should_match": "100%"
}
}
}
But I am getting results where a document looks like this
{
"_index": "pyramid-dev",
"_type": "request-logs",
"_id": "AWGKTEccLurs6cVv0N0H",
"_score": 11.130073,
"_source": {
"path": "/var/log/nginx/access.log",
"timestamp": "02/Feb/2018:14:45:27 +0000"
}
}
As you can see it is not 27/Feb but still I am getting the result as 27 is present in the field.
How to solve this?
I tried using phrase query but it says
IllegalStateException[field \"timestamp\" was indexed without position data; cannot run PhraseQuery (term=27)]
And I cant use prefix query also as there is no not_analyzed version of it.
The timestamp field is a string.
Please help me how to solve this.