lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Malorny <>
Subject spatial searches
Date Tue, 11 May 2010 13:18:15 GMT

Hi all,

I hope someone can enlighten me. I am trying to figure out how spatial searches 
are to be implemented with Lucene. From walking through mailing lists and 
various web pages, looking at the JavaDoc and source code, I understand how the 
tiers work and how the search is limited by a special term query containing the 
ID(s) of the relevant grid cells.

However, it still puzzles me how, where and when the final distance filtering 
takes place. I see three possibilities: the "Filter" class, the 
"ValueSourceQuery" or the use of a subclass of "Collector". With my limited 
understanding of the inner working of Lucene, it seems to me that the first two 
ways more or less operate on the whole document set, i.e. prior to the moment 
where the term query for the tiers comes into effect, rendering it useless. The 
"Collector" approach seems to be much more appropriate, but additionally to the 
decision whether the document meets the distance condition or not, I would like 
to have different scores depending on the distance (lower score for larger 
distances). Originally I thought that the solution would be some kind of 
subclass of "Query", but haven't seen any hints pointing in this direction and I 
don't know whether I am able to implement that on my own. I fear that I 
completely misunderstand something. Thanks in advance for any hints.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message