lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: sorting and score ordering
Date Thu, 14 Oct 2004 15:27:34 GMT
On Oct 13, 2004, at 5:40 PM, Chris Fraschetti wrote:
> and finally if i do....
> SortField score_sort = ScoreField.FIELD_SCORE;
> SortField rank_sort = new SortField(RANK_FIELD, true);
> SortField[] sort_fields = {score_sort, rank_sort};
> Sort sort = new Sort(sort_fields);
> hits =, sort);
> I get the same results as I did with the score_sort only... no change
> in the ordering of the rank is there... any ideas? It looks to me as
> if it's completely ignoring it.

This is sorting first by score and then by your rank field.  The rank 
field sort only applies when the scores are the same.  I suspect you're 
getting different scores so you'd never see rank come into play.

Display the score and rank in your results to see for sure.


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

View raw message