I'm trying to get the top 100 documents which match the filtered criteria,
and sort by distance from the pin.location.
Here's my query - which isn't resulting in error, but should be returning
results:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": [
{
"term": {
"searchTerm1": "N"
}
},
{
"term": {
"searchTerm2": "Y"
}
},
{
"term": {
"searchTerm3": "Y"
}
},
{
"term": {
"searchTerm4": "Y"
}
}
]
}
},
"sort": [
{
"_geo_distance": {
"pin.location": {
"lat": 34.073620,
"lon": -118.400356
},
"order": "asc",
"unit": "mi"
}
}
],
"size": 100
}
On a separate note, I'd like to find a way to make the filter more of a
suggestion, rather than forced - how would I achieve this?
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/22379295-332d-4ebe-aef3-6c9b2326e755%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.