- Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categoriesbug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :R5b96b:">>bugTeam:SearchMeta label for search teamMeta label for search team
Description
If you write a date range query with numeric parameters we can interpret them as a year. Check it out:
curl -XDELETE -uelastic:password localhost:9200/test curl -XPOST -HContent-Type:application/json -uelastic:password localhost:9200/test/_doc?refresh -d'{"d": "1970-01-01T00:00:01.010Z"}' curl -XPOST -HContent-Type:application/json -uelastic:password localhost:9200/test/_doc?refresh -d'{"d": "1967-01-01T00:00:00.000Z"}' curl -XPOST -HContent-Type:application/json -uelastic:password localhost:9200/test/_search?pretty -d'{ "query": { "range": { "d": { "gt": 1000 } } } }' The 1000 gets turned into a String internally and then we parse it as the year 1000.
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categoriesbug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :Ra5pmb:">>bugTeam:SearchMeta label for search teamMeta label for search team