DocListAndSet results = rb.getResults(); Map<SolrDocument,Integer> docIds = new HashMap<>(results.docList.size()); SolrDocumentList solrDocList = docListToSolrDocumentList( results.docList, rb.req.getSearcher(), engine.getFieldsToLoad(rb.req), docIds); Object clusters = engine.cluster(rb.getQuery(), solrDocList, docIds, rb.req);