[jsword-svn]
jsword/java/jsword/org/crosswire/jsword/book/search/lucene s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Mon May 2 19:21:21 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene
In directory www.crosswire.org:/tmp/cvs-serv2742/java/jsword/org/crosswire/jsword/book/search/lucene
Modified Files:
LuceneIndex.java
Log Message:
Added dialog for search result counts. Fixed a bug using lucene scores that were less than 0.01.
Index: LuceneIndex.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndex.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** LuceneIndex.java 2 May 2005 01:29:32 -0000 1.17
--- LuceneIndex.java 3 May 2005 02:21:19 -0000 1.18
***************
*** 191,195 ****
{
Verse verse = VerseFactory.fromString(hits.doc(i).get(LuceneIndex.FIELD_NAME));
! int score = (int) (hits.score(i) * 100);
tally.add(verse, score);
}
--- 191,196 ----
{
Verse verse = VerseFactory.fromString(hits.doc(i).get(LuceneIndex.FIELD_NAME));
! // PassageTally understands a score of 0 as the verse not participating
! int score = (int) (hits.score(i) * 100 + 1);
tally.add(verse, score);
}
More information about the jsword-svn
mailing list