Reputation: 5591
In elasticsearch, there is a date range query and fuzzy date query, however I don't see a query for querying a specific date.
Do you know if that type of query exists?
Upvotes: 1
Views: 1983
Reputation: 896
Use the following mapping:
"properties": {
"myDate": {
"type": "date",
"format": "dd-MM-yyyy"
}
}
The query for searching the exact date would be:
"query": {
"term": {
"myDate": {
"value": "10-10-2010"
}
}
}
Upvotes: 2