lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Fraschetti <frasche...@gmail.com>
Subject Re: sorting and score ordering
Date Thu, 14 Oct 2004 16:14:01 GMT
Is there a way to generalize the score that lucene is comparing ? I.e.
round it off to say a precision of 0.## ? In order to make this sort
work better with 'duplicate' values? (by my terms... hits that have
scores within within a certain distance of eachother.)

-Chris


On Thu, 14 Oct 2004 11:27:34 -0400, Erik Hatcher
<erik@ehatchersolutions.com> wrote:
> 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 = searcher.search(query, 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.
> 
>        Erik
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


-- 
___________________________________________________
Chris Fraschetti, Student CompSci System Admin
University of San Francisco
e fraschetti@gmail.com | http://meteora.cs.usfca.edu

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


Mime
View raw message