I want to make a query with a keyword and show only the posts 150km around me within the queried keyword my query below is working but shows all the posts
{
"query": {
"regexp": {
"title": {
"value": ".*h.*",
"flags": "ALL",
"max_determinized_states": 10000,
"rewrite": "constant_score"
}
}
},
"sort": [{
"date": {
"order": "desc"
}
}]
}
but when I add the filter query like follows I am receiving parsing error
"filter": {
"geo_distance": {
"distance": "150km",
"location": {
"lat": \(latitude),
"lon": \(longitude)
}
}
}
Any one can help please