I'm using query string query to retrieve data from api where NAME field equals TEST and its being updated TODAY.
Lastupdate field is timestamp format (2019-11-09 10:04:56.530000000)
I tried to do it this way, Which do not throw error but it clearly do not work as well, some of records are from months ago some of them yrs ago and I want to query only today.
/data/_search?q=name:TEST lastupdate:[now-1d/d TO now/D]
P.S I know how can I do it with query dsl with gte lt attributes of ranges but as I will be using this data in Power BI I have to feed json to it via URL so thats why I'm searching ways to do it in URI.
Maybe you're just missing an AND
from your query param? Does the following give you your expected results?
GET /data/_search?q=name:TEST+AND+lastupdate:[now-1d/d+TO+now/d]