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: Sort by membership of range query
Date Tue, 04 May 2010 21:40:28 GMT

: What I can't quite figure out is how, when including all results, to sort
: the results by whether they are "active" or not. In other words, have all
: products within the date range appear before the products outside the date
: range (or vice versa).

if you want it to function as a true "sort" option (as in: you want to 
sort by active or not, then sort by some rating field, then sort by score 
as a final resort) it isn't possible in 1.4 (but Grant's roadmap for 
spatial work in the next version of Solr will include the ability to 
specify an arbitrary function as a sort "field" so it should be possible 
eventually)

what you can do if you normally sort by score is to "boost" the score of 
any docs that match your active criteria, so that they score much much 
higher then docs which are not active...

q=+(your query) (startDate:[* TO NOW] -endDate:[* TO NOW])^100000


-Hoss


Mime
View raw message