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.
@warkolm - I put together a simple example with two docs and it seems to be working using the original code I had. My index is a bit more complex so I think there must be something else going on and I probably need to do some more debugging.
Here is working example which should return 2 hits as Bellevue, WA is within 7 miles of Seattle, or at least the lat/longitude I'm using in the example meets that criteria
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.