You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Da...@sybase.com on 2006/01/31 13:12:57 UTC
Sorting
My primary sort is by date and my secondary sort is by relevance score.
The Hits.getScore() method returns the score by 7 digits to the right of
the decimal point. Therefore, If I round to only 2 decimal points in the
display, the underlying 7 point score will be different in the sort.
Example: score = .7876546 Display score = 79% The two scores
should be equal in sort.
score = .7907536 Display score = 79%
How do I convert the score in the Hits.getScore() method to sort to the
rounded 2 decimal point float like the score displayed?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Clark, Senior Consultant
Sybase Federal Professional Services
6550 Rock Spring Drive, Suite 800
Bethesda, MD 20817
Office - (301) 896-1103
Office Fax - (301) 896-1604
Mobile - (703) 403-0340
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Sorting
Posted by Da...@sybase.com.
Actually, the relevance is the primary sort, and the date is the secondary
sort. Still the same sort problem. Any help will be greatly appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Clark, Senior Consultant
Sybase Federal Professional Services
6550 Rock Spring Drive, Suite 800
Bethesda, MD 20817
Office - (301) 896-1103
Office Fax - (301) 896-1604
Mobile - (703) 403-0340
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel.Clark@syba
se.com
To
01/31/2006 07:12 java-user@lucene.apache.org
AM cc
Subject
Please respond to Sorting
java-user@lucene.
apache.org
My primary sort is by date and my secondary sort is by relevance score.
The Hits.getScore() method returns the score by 7 digits to the right of
the decimal point. Therefore, If I round to only 2 decimal points in the
display, the underlying 7 point score will be different in the sort.
Example: score = .7876546 Display score = 79% The two scores
should be equal in sort.
score = .7907536 Display score = 79%
How do I convert the score in the Hits.getScore() method to sort to the
rounded 2 decimal point float like the score displayed?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Clark, Senior Consultant
Sybase Federal Professional Services
6550 Rock Spring Drive, Suite 800
Bethesda, MD 20817
Office - (301) 896-1103
Office Fax - (301) 896-1604
Mobile - (703) 403-0340
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org