thinkaurelius/titan — pull request #441 by kainosnoema (2013-10-19 00:12:48+00:00)
Title: Add support for search within polygon Geoshape

The current version of ElasticSearch supports the GeoPolygonFilter, so it was trivial to add support for polygons with an arbitray number of boundary points. Works great. I added a test and the suite passes.

The trickiest part of this is the interface to easily create a polygon Geoshape with both Java and Groovy syntax. This is where I ended up (seemed consistent with the other constructors), but I'm open to suggestions:

``` groovy
g.V.has('location', WITHIN, Geoshape.polygon(37.0,22.0, 40.0,22.0, 40.0,24.0, 37.0,24.0))
```

We could support `ArrayList(2)` arguments to make the Groovy a bit nicer, but it would increase the complexity. Thoughts?