Hi David, Many thanks for the pointers and sharing the slides. I will take a look in that direction.
Regards, Prasad. On Tue, Dec 2, 2014 at 8:38 PM, david.w.smi...@gmail.com < david.w.smi...@gmail.com> wrote: > Hi Prasad, > > Firstly, the Lucene ‘general’ list is not the appropriate list; it’s the > java-user lucene list so I’m replying there instead. > > This is mostly about query parsing. If you look at Lucene’s modules, > you’ll see a “queryparser” module. In there, there’s a “flexible” package > which is named as-such because it’s a flexible query parsing framework. It > comes with a pre-built instantiation that emulates Lucene’s > standard/classic query parser syntax. You’ll need to modify the javacc > syntax definition a ‘.jj’ file and plug in a variety of pieces into the > framework. Ultimately, when you get to the ‘builder’ part, you'll create a > suitable Lucene Query by calling spatialStrategy.makeQuery(…). > > I can’t offer much more help on this so I hope this is enough to get you > going. > > ~ David Smiley > Freelance Apache Lucene/Solr Search Consultant/Developer > http://www.linkedin.com/in/davidwsmiley > > On Tue, Dec 2, 2014 at 4:53 PM, rama44ster <rama44s...@gmail.com> wrote: > >> Hi all, >> I have started trying out lucene for one of my projects and I have a table >> where the document has a latitude, longitude associated with it. I would >> like to retrieve only those documents whose latitude and longitude fall >> inside a bounding box that has two co-ordinates, (x_1, y_1) and (x_2, >> y_2). >> >> Is there any way, I can implement this in lucene? Is it possible to extend >> the parser to understand a new syntax where I can express this in the text >> query and have the parser build a query that will contain all the logic >> necessary to do this check. Something like IN_BOX(latitude, longitude, >> 23.00, 26.00, 50.00, 60.00). Here latitude and longitude are two stored >> fields and 23,26 and 50,60 are the two co-ordinates for bounding box. >> >> I also checked the spatial package of lucene, but couldn’t find any >> pointers. >> >> Thanks, >> Prasad. >> > >