I'd like to store documents with multiple geo_point properties in
ElasticSearch. Then I want to query the documents so that only those
documents are returned which have at least one geo_point within a defined
range (lat/lon plus radius). Other non-spatial filters should be applied at
the same time.
My question: Is this possible? How would a document and a query have to
look like, as an example?
As far as I can tell right now I don't need any sorting based on distance.
I'd like to store documents with multiple geo_point properties in Elasticsearch. Then I want to query the documents so that only those documents are returned which have at least one geo_point within a defined range (lat/lon plus radius). Other non-spatial filters should be applied at the same time.
My question: Is this possible? How would a document and a query have to look like, as an example?
As far as I can tell right now I don't need any sorting based on distance.
You're right, why not just try it out? I have set up a test. Right now it
seems as if I couldn't even get the distance range query working with only
one geo_point per document.
I've sorted it out. A "es.refresh()" was lacking after the indexing. Gist
is updated.
The test tells me that in fact using multiple geo_points works just fine.
The last query returns two out of three documents.
Thanks for help and encouragement! This is great news for me since it
brings me one step closer to migrating http://offeneskoeln.de/ to
Elasticsearch at some point. Probably I will run some performance test
before though, to make sure that distance filters are something I would
want to offer to all the users, all the time.
Cheers,
Marian
Am Mittwoch, 17. Oktober 2012 13:02:20 UTC+2 schrieb Tanguy:
Seems good to me. Have you tried to run the query with cURL or Es head?
I've sorted it out. A "es.refresh()" was lacking after the indexing. Gist is updated.
The test tells me that in fact using multiple geo_points works just fine. The last query returns two out of three documents.
Thanks for help and encouragement! This is great news for me since it brings me one step closer to migrating http://offeneskoeln.de/ to Elasticsearch at some point. Probably I will run some performance test before though, to make sure that distance filters are something I would want to offer to all the users, all the time.
Cheers,
Marian
Am Mittwoch, 17. Oktober 2012 13:02:20 UTC+2 schrieb Tanguy:
Seems good to me. Have you tried to run the query with cURL or Es head?
In case you like hints about ES setup and configuration, just ping me
Cheers, Jörg
On Wednesday, October 17, 2012 1:17:49 PM UTC+2, Marian Steinbach wrote:
I've sorted it out. A "es.refresh()" was lacking after the indexing. Gist
is updated.
The test tells me that in fact using multiple geo_points works just fine.
The last query returns two out of three documents.
Thanks for help and encouragement! This is great news for me since it
brings me one step closer to migrating http://offeneskoeln.de/ to
Elasticsearch at some point. Probably I will run some performance test
before though, to make sure that distance filters are something I would
want to offer to all the users, all the time.
Cheers,
Marian
Am Mittwoch, 17. Oktober 2012 13:02:20 UTC+2 schrieb Tanguy:
Seems good to me. Have you tried to run the query with cURL or Es head?
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.