I am trying to obtain geodistance values for records in cases where
geodistance is not the primary purpose of the search (i.e. do not want it
to affect score/sort not included in a query/filter), but where that
information might be useful anyway.
As outlined in these example cases https://gist.github.com/alexeiemam/04eda6fff5915f9cef66, script_field can
be used to obtain geodistance on a top level geopoint (example 3), but not
within an object field with geopoint fields (examples 4 and 5). Sorting by
geodistance, however, deals with geopoints within object fields without
issue (examples 1 and 2).
Is there any way to access these distance values outside of sorting?
Are there any known workarounds or suggestions?
Strange. The only thing I can think of is you have a document that does not
have a value for the field: doc.all_places.location_point. Can you narrow
down your search to only documents that contain that field and check?
Thanks!
Strange. The only thing I can think of is you have a document that does not have a value for the field: doc.all_places.location_point. Can you narrow down your search to only documents that contain that field and check? Thanks!
This communication is from Chapter Media Limited. This email (including any attachments) is intended only for the recipient(s) named above. It may contain confidential or privileged information. If you are not the intended recipient, please do not read, distribute, copy or otherwise use this communication or the information in it. Any views or opinions expressed in this email may be solely those of the author and are not necessarily those of Chapter Media Limited
On Wednesday, April 16, 2014 6:57:45 PM UTC+1, Binh Ly wrote:
Strange. The only thing I can think of is you have a document that does
not have a value for the field: doc.all_places.location_point. Can you
narrow down your search to only documents that contain that field and
check? Thanks!
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.