lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R.A.Ittoo" <>
Subject gettotalhits vs totalhits
Date Sat, 17 Oct 2009 11:43:04 GMT
I am wondering what is the difference between

collector.getTotalHits();//where collector is a TopScoreDocCollector
(which returns the correct value for my example = 2 docs)


  collector.topDocs().totalHits (which returns 0, and is wrong)

the collector was used in a search:,collector);

Strangely enough, collector.topDocs().scoreDocs.length; returns the 
correct value (length = 2)

Can anyone please advise when to use what (and what are the 
differences between the objects above)


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

View raw message