lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael van Rooyen <mich...@loot.co.za>
Subject Document boosting and native ordering of results
Date Tue, 20 Aug 2013 15:36:10 GMT
Hello.  We've just upgraded to 4.3.1 from 2.9.2 and are having a problem 
with native ordering of search results.

We always want documents returned in order of "rank", which for us is a 
float value that we assign to each document at index time. Rank depends 
in whether, for example, the item is in stock and how recent it is.  We 
also store the rank as a field in the index. We don't use Lucene's 
scoring system for ordering results at all.

In 2.9.2, we used to set the boost on the document (we encoded our rank 
to ensure nice distribution over float range that is ultimately encoded 
as a 1 byte norm), and all results were returned in rank order without 
using a sort.

In 4.3.1, the document level boost is gone and only fields can be 
boosted.  Some queries, like a MatchAllDocsQuery, don't seem to take 
field level boosts into account at all when ordering results.

Is there an easy way in Lucene 4 to set the natural order for results in 
the absence of an explicit sort?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message