lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: custom sorting
Date Thu, 01 Nov 2007 01:18:06 GMT

: If you went with the FunctionQuery approach for sorting by distance, would
: there be any way to use the output of the FunctionQuery to limit the
: documents to those within a certain radius?  Or is it just for boosting
: documents, not for filtering?

FunctionQueries don't restrict the set of documents at all, so you would 
need to combine it with a seperate query that limits the documents ... the 
simplest way would be as you say: by combining it with two range queries 
that would define a lat/lon "bounding box"

: Also, even if you're just using it for boosting, is there a way to avoid
: running the expensive function on all docs in the index?  Could you somehow

that's the bueaty of "skipTo" in query scoring ... BooleanQueries keep 
track of the "next" document each clause can match (in order by docid), 
and tell all of the other queries to "skipTo" that doc and not bother 
trying to score any doc ids below that.



-Hoss


Mime
View raw message