Hi, I have issue related to search through datetime
range query. I tried to search some data which is oldest after a certain period. I read documentation and try to make query and I'm unable to get any of the data.
GET /my-index/_search
{
"query": {
"range": {
"datetime": {
"lt": "now-3d/d"
}
}
}
}
It is working fine if I use only now
in query.
GET /my-index/_search
{
"query": {
"range": {
"datetime": {
"lt": "now"
}
}
}
}
The actual response if I use with now
and I have enough data of last week so it should work.
{
"_index" : "my-index",
"_type" : "_doc",
"_id" : "96234123102",
"_score" : 1.0,
"_source" : {
"service" : "ONEZAPP",
"description" : "CUSTOMER PORTAL FUND TRANSFER",
"service_id" : 547,
"oneload_transaction_type_id" : 2,
"status" : "SUCCESS",
"datetime" : "2021-08-24T10:16:09.000Z"
}
}
How should I search or delete records using datetime
search so I can do further operations on it?