ElasticSearch date range
问题 I have the following query: { "query": { "query_string": { "query": "searchTerm", "default_operator": "AND" } }, "facets": { "counts": { "date_histogram": { "field": "firstdate", "interval": "hour" } } } and I would like to add a date range to it, so as to retrieve values for the field firstdate which are within a specific from/to interval. Any suggestions on how to do it? Many thanks! 回答1: you just need to add a range filter to your query: { "query":{ "filtered": { "query": { "query_string":