Hello,
To return the distance information for each document and the query search origin, I'm using the following snippet:
"script_fields": {
"distance": {
"script": "doc['location_lat_lon'].arcDistance(40,-105)"
}
}
Does AWS ElasticSearch accept this kind of script field? If not, how can I modify this code to return the distance of each doc to the query search origin?
Cloud by elastic is one way to have access to all features, all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas, APM, Logs UI, Infra UI, SIEM, Maps UI, AppSearch and what is coming next ...
Thanks for your reply. Yeah, I can sort by distance and have that value in the response. However, if the order of sort keys are different then order of those values in the response is also different. Need to keep a mapping for it at the query time (it's doable), but this way was always robust no matter if we sort by distance or not, we always get a key-value for it in the response (easy to parse).
The reason is our other services are in AWS. However, sure, we'll think about it more ;).
This is very useful to me. So, you're saying we can purchase the service from ES, have all the features, but still host it in AWS?
So, if we get it from this link, we have both benefits?
Exact. If you go directly to cloud.elastic.co you can have a 14 days free trial without any credit card to test it.
Don't use the marketplace link as it won't be free using this link.
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.