lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Kumar <muthoj...@gmail.com>
Subject Re: Continuously iterate over documents in index
Date Wed, 14 Jul 2010 14:56:59 GMT
All,

Issue: Unable to get the proper results after searching. I added sample code
which I used in the application.

If I used *numHitPerPage* value as 1000 its giving expected results.
ex: The expected results is 32 docs but showing 32 docs
Instead If I use *numHitPerPage* as 2^32-1 its not giving expected results.
ex: The expected results is 32 docs but showing only 29 docs.

Sample code below:


StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);
 QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, defField,
analyzer);
Query q = qp.parse(queryString);
TopDocsCollector tdc = TopScoreDocCollector.create(*numHitPerPage*, true);
IndexSearcher(is).search(q,tdc);

ScoreDocs[]  noDocs  = tdc.topDocs().scoreDocs;

Please let me know if any other way to search?

Thanks.
Kiran. M

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message