}
Element p = doc.addPara();
p.appendChild("Results " + Integer.toString(lq.skip + 1) + " to " + Integer.toString(lq.size + lq.skip) + " of " + Integer.toString(hitsTotal) + ": ");
if(lq.skip > 0) p.appendChild(doc.makeLink(lq.getQueryURL(Math.max(lq.skip - lq.size, 0), lq.size), "prev"));
p.appendChild(" ");
if(lq.size + lq.skip < hitsTotal) p.appendChild(doc.makeLink(lq.getQueryURL(lq.skip + lq.size, lq.size), "next"));
TopDocs td = tdc.topDocs();
for(int i=lq.skip;i<lq.skip+lq.size;i++) {
File f = new File(ir.document(td.scoreDocs[i].doc).get("filename"));
Element body = doc.getBody();