[ 
https://issues.apache.org/jira/browse/SOLR-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598179#action_12598179
 ] 

Noble Paul commented on SOLR-578:
---------------------------------

It is by design that SOLR keep the requesthandlers and response writers loosely 
coupled. The responsibilities are clearly defined 
* RequestHandler : Takes in the request parameters , do the necessary 
operations and prepare a response to be written back to the client
* ResponseWriter : Take in the response *object* and write it down in a format 
of client's choice 

If your Handler can write out data only  using a specific writer, you have the 
flexibility of overriding the 'wt' in the handler. Register your own writer in 
solrconfig.xml.

We are implementing SOLR-561 using the same strategy .
* We have a handler which reads an index file (or a part of it)  and puts the 
stream object into the SolrQueryResponse rsp.add("stream", inputstreamobject) 
* It sets a custom writer . (solrparams.Params.set("wt", "filestream")).  
* The custom binary writer then take the inputstream object (rsp.get("stream")) 
and pipe the data to the outputstream.



> Binary stream response for request
> ----------------------------------
>
>                 Key: SOLR-578
>                 URL: https://issues.apache.org/jira/browse/SOLR-578
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Jason Rutherglen
>
> Allow sending binary response back from request.  This is not the same as 
> encoding in binary such as BinaryQueryResponseWriter.  Simply need access to 
> servlet response stream for sending something like a Lucene segment.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to