Documents with geo polygon

Hi all,

I am pretty new to elasticsearch and would like to know how to add
documents to be indexed with geo spatial features of a polygon and be
able to search for all documents that is covered by another polygon.
For example, how do I add a document like this to be indexed.
{"Title": "lake", "loc":{"polygon":[12,24],[21,32],[26, 44],[22,38],
[15 29] }}

when this document is added to the index, how do I search for it when
another polygon is given.

Thanks,

Felix

There is only support for single geo points, not polygons to index, on
those single geo points, you can do distance, bounding box, and polygon.

On Sun, May 6, 2012 at 5:09 AM, Felix guohangao@gmail.com wrote:

Hi all,

I am pretty new to elasticsearch and would like to know how to add
documents to be indexed with geo spatial features of a polygon and be
able to search for all documents that is covered by another polygon.
For example, how do I add a document like this to be indexed.
{"Title": "lake", "loc":{"polygon":[12,24],[21,32],[26, 44],[22,38],
[15 29] }}

when this document is added to the index, how do I search for it when
another polygon is given.

Thanks,

Felix

Hello, I was wondering with the latest release of ES does it support Polygon indexes now? I was reading that Lucene 4.0 seemed to support it with JTS extensions. Do you know if this is the case with ES?

I think i might of found my answer
http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html

Does anyone have any experience with the accuracy of these queries? Would it compare to say an oracle or postgres polygon query? I'm interested in Point in Polygon accuracy as well as polygon in polygon search.

Thanks