Hi, I'm trying to keep this a lucene only project rather than bring in solr which, as I understand, needs to run in a separate web container. I'd like to use a single webapp for my project as I'm unsure of the implications of hosting such a project on the cloud.
I downloaded lucene-spatial-playground and had a poke through the code and found that TwoDoublesStrategyTestCase runs the following query: [San Francisco] G5391959 @ IsWithin(-122.524918 37.674973 -122.360123 37.817108) This seemed close to what I wanted except that it uses a bounding box instead of a circle. Taking inspiration from BaseSpatialContextTestCase.checkBasicShapeIO() I tried the following [San Francisco] G5391959 @ IsWithin(*Circle*( -122.524918 37.674973 distance=7.89)) But unfortunately I got the following exception: InvalidShapeException: A rectangle is the only supported at this time, not class org.apache.lucene.spatial.base.shape.simple.CircleImpl So it seems that isWithin a circle is not currently supported. If anyone has any information/documentation on the lucene-spatial-playground it would be helpful. In the mean time I have taken inspiration from http://www.java-community.de/archives/156-Spatial-search-with-Lucene.htmlto come up with a working solution. Results: 20 tube stations are 1 miles from liverpool st 47 tube stations are 2 miles from liverpool st 92 tube stations are 3 miles from liverpool st 138 tube stations are 4 miles from liverpool st But I'm a bit worried about this solution since Yonik has pointed out that the tier based approach is broken. Yonik, any more info on why this is broken? Perhaps a bounding box that works is better than a circle that doesn't ;) Cheers, Lance. On 31 December 2011 18:07, Yonik Seeley <yo...@lucidimagination.com> wrote: > On Sat, Dec 31, 2011 at 11:52 AM, Lance Java <lance.j...@googlemail.com> > wrote: > > Hi, I am new to Lucene and I am trying to use spatial search. > > The old tier-based stuff in Lucene is broken and considered deprecated. > > For Lucene, this may currently be your best hope: > http://code.google.com/p/lucene-spatial-playground/ > > Solr has also had built-in spatial for a little while too: > http://wiki.apache.org/solr/SpatialSearch > > > -Yonik > http://www.lucidimagination.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >