I have an elasticsearch index called tweets, I'm trying to filter these tweets by geo_distance, date, and optional string that might be passed. How should this query be like to meet my requirements
"query":{
"bool": {
"must": [
{
"term": {
"text": "ew"
}
},
{
"range": {
"date": {
"gte": "2009-05-31T02:30:45",
"lt": "now"
}
}
},
{
"filter": {
"geo_distance": {
"distance": "12km",
"pin.location": [-70, 40]
}
}
}
]
}
}
Thanks in advance