Hi,
I'm pretty new to elastic and I'm using Elastic 5.4.3. I'm trying to perform a bool query search using "must" and also apply a geo_distance filter at the same time. My results are not quite what I'm expecting.
I'm expecting 2 records back, but only getting 1.
My geo_distance filter successfully returns a record in Bellevue, WA, which is within 15 miles of the lat/lon I specified below, but there is also a record that has a value of "Seattle, WA United States" in the "customer_location" field. I would think this record would be returned also, but it's not. I basically want to return any records that match the value in the customer_location field as well as any records that fall within my geo_distance filter.
Any idea why?
My code which I'm running from Kibana:
GET /businesses/postings/_search
{
"query": {
"bool" : {
"must" : {
"match" : {
"customer_location": "Seattle, WA United States"
}
},
"filter" : {
"geo_distance" : {
"distance" : "15miles",
"geo_location" : {
"lat" : 47.6062,
"lon" : -122.3321
}
}
}
}
}
}