Tuesday, 10 September 2013

Lucene - How to get more doc

Lucene - How to get more doc

How can I get more doc in lucene4.Here is my code.
int limit = 1000;
TopFieldColletor collector =
TopFieldColletor.create(sort,limit,true,false,false,false);
searcher.search(query,collector);
ScoreDoc[] sds = collector.topDocs().scoreDocs;
System.out.println("sd:" + sds.length);
System.out.println("total:" + collector.getTotalHits());
This is my result:
sd:1000
total:9060
My question is I got the 1000 doc, how to get the next 1000, until the end
to take.

No comments:

Post a Comment