Element summary = makeSummary();
response.add(new Document(summary));
if (getTo() > 0)
{
StatelessQueryService sqs = getQueryService(srvContext);
InformationFragment fragshtml[] = null;
if (_html) {
ExplicitRecordFormatSpecification htmlrfs = new ExplicitRecordFormatSpecification("html", null, "f");
StatelessSearchResultsPageDTO res = sqs.getResultsPageFor(this.zinfo.getSetname(),this.zinfo.getQueryModel(),this.zinfo.getLandscape(),getFrom(),getTo(),def_html_request_spec,htmlrfs,null);
fragshtml = res.records;
}
ExplicitRecordFormatSpecification rfs = new ExplicitRecordFormatSpecification("xml", null, "f");
StatelessSearchResultsPageDTO res = sqs.getResultsPageFor(this.zinfo.getSetname(),this.zinfo.getQueryModel(),this.zinfo.getLandscape(),getFrom(),getTo(),def_request_spec,rfs,null);
InformationFragment frags[] = res.records;
// FIXME: we may not get all the records we want back sometimes!
int fragsLength = 0;
if (frags != null) fragsLength = frags.length;