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

Hoss Man commented on SOLR-578:
-------------------------------

bq. 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.

Correct.  

(a handler can even go so far as to "fail" in the inform(SolrCore) method if 
the writer it expects is not present)

The ShowFileRequestHandler and RawResponseWriter are good examples of this 
model (although it would probably make sense to change RawResponseWriter to 
implement BinaryQueryResponseWriter at some point)

bq. It is incongruous to have SolrQueryRequest.getContentStreams() but nothing 
similar for SolrQueryResponse.

Only if you are use to thinking of things in terms of the servlet API : )

generally speaking, the majority of Request Handlers shouldn't be dealing with 
raw character or binary streams ... they should be dealing with simple objects 
and deferring rendering of those objects to the QueryResponseWriter to decide 
how to render them based on the wishes of the client ... there are exceptions 
to every rule however, hence the approach described here where the Handler 
"forces" a particular response writer.

> 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