I'm quite the newbie when it comes to elasticsearch or GIS matters, so
please excuse any dumb questions or misunderstandings.
I have two indices with one type each: one in which I store districts of a
certain kind with a geo_shape (multipolygons, mostly), another in which I
store some sort of POI with a geo point property.
I'd like to be able to retrieve all POIs inside a given district. I was
thinking of using the geoshape filter, unfortunately I cannot seem to use
it on geo points. I could convert my geo points to geo shapes, but it looks
like this would render the geo distance filter unusable, though I need it
as well.
Could anyone give me some advice on how to keep both functionalities
(filtering on points in an indexed polygon and on points within a certain
distance) ?
I'm quite the newbie when it comes to elasticsearch or GIS matters, so
please excuse any dumb questions or misunderstandings.
I have two indices with one type each: one in which I store districts of a
certain kind with a geo_shape (multipolygons, mostly), another in which I
store some sort of POI with a geo point property.
I'd like to be able to retrieve all POIs inside a given district. I was
thinking of using the geoshape filter, unfortunately I cannot seem to use
it on geo points. I could convert my geo points to geo shapes, but it looks
like this would render the geo distance filter unusable, though I need it
as well.
Could anyone give me some advice on how to keep both functionalities
(filtering on points in an indexed polygon and on points within a certain
distance) ?
Thanks for your answer. I was alluding to this possibility in my post, but
then, it looks to me like the geo distance filter won't work with
geo_shapes. Am I getting that wrong ?
--
Alain
Le vendredi 7 mars 2014 08:42:07 UTC+1, Alexander Reelsen a écrit :
Hey,
you can also use geo_shapes instead of geo_points, as there is a specific
geo_shape from type point. Then your query should work.
--Alex
On Thu, Mar 6, 2014 at 5:48 PM, Alain Perry <alain...@gmail.com<javascript:>
wrote:
I'm quite the newbie when it comes to elasticsearch or GIS matters, so
please excuse any dumb questions or misunderstandings.
I have two indices with one type each: one in which I store districts of
a certain kind with a geo_shape (multipolygons, mostly), another in which I
store some sort of POI with a geo point property.
I'd like to be able to retrieve all POIs inside a given district. I was
thinking of using the geoshape filter, unfortunately I cannot seem to use
it on geo points. I could convert my geo points to geo shapes, but it looks
like this would render the geo distance filter unusable, though I need it
as well.
Could anyone give me some advice on how to keep both functionalities
(filtering on points in an indexed polygon and on points within a certain
distance) ?
Thanks for your answer. I was alluding to this possibility in my post, but
then, it looks to me like the geo distance filter won't work with
geo_shapes. Am I getting that wrong ?
--
Alain
Le vendredi 7 mars 2014 08:42:07 UTC+1, Alexander Reelsen a écrit :
Hey,
you can also use geo_shapes instead of geo_points, as there is a specific
geo_shape from type point. Then your query should work.
I'm quite the newbie when it comes to elasticsearch or GIS matters, so
please excuse any dumb questions or misunderstandings.
I have two indices with one type each: one in which I store districts of
a certain kind with a geo_shape (multipolygons, mostly), another in which I
store some sort of POI with a geo point property.
I'd like to be able to retrieve all POIs inside a given district. I was
thinking of using the geoshape filter, unfortunately I cannot seem to use
it on geo points. I could convert my geo points to geo shapes, but it looks
like this would render the geo distance filter unusable, though I need it
as well.
Could anyone give me some advice on how to keep both functionalities
(filtering on points in an indexed polygon and on points within a certain
distance) ?
Thank you.
--
Alain
--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.
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.