use of org.apache.solr.SolrTestCaseJ4 in project lucene-solr by apache.
the class MockSolrEntityProcessor method getDocs.
private SolrDocumentList getDocs(int start, int rows) {
SolrDocumentList docs = new SolrDocumentList();
docs.setNumFound(docsData.size());
docs.setStart(start);
int endIndex = start + rows;
int end = docsData.size() < endIndex ? docsData.size() : endIndex;
for (int i = start; i < end; i++) {
SolrDocument doc = new SolrDocument();
SolrTestCaseJ4.Doc testDoc = docsData.get(i);
doc.addField("id", testDoc.id);
doc.addField("description", testDoc.getValues("description"));
docs.add(doc);
}
return docs;
}
Aggregations