The ResponseWriterUtil class has been replaced with DocsStreamer (org.apache.solr.response.DocsStreamer
).
Depending on the API version, you either give it it's parameters from the ResultContext (for 5.5.2):
DocsStreamer(DocList docList, Query query, SolrQueryRequest req, ReturnFields returnFields)
static SolrDocument getDoc(Document doc, IndexSchema schema)
or in newer versions, you give it the resultcontext directly:
DocsStreamer(ResultContext rctx)
static SolrDocument getDoc(Document doc, IndexSchema schema)
If you use the constructor you get an iterator over the doclist from the result context, and you can use .next()
to move to the next document as necessary.