Class RawResponseWriter

java.lang.Object
org.apache.solr.response.RawResponseWriter
All Implemented Interfaces:
BinaryQueryResponseWriter, QueryResponseWriter, NamedListInitializedPlugin
Direct Known Subclasses:
PrometheusResponseWriter

public class RawResponseWriter extends Object implements BinaryQueryResponseWriter
Writes a ContentStream directly to the output.

This writer is a special case that extends and alters the QueryResponseWriter contract. If SolrQueryResponse contains a ContentStream added with the key CONTENT then this writer will output that stream exactly as is (with its Content-Type). if no such ContentStream has been added, then a "base" QueryResponseWriter will be used to write the response according to the usual contract. The name of the "base" writer can be specified as an initialization param for this writer, or it defaults to the "standard" writer.

Since:
solr 1.3
  • Field Details

    • CONTENT_TYPE

      public static final String CONTENT_TYPE
      See Also:
    • CONTENT

      public static final String CONTENT
      The key that should be used to add a ContentStream to the SolrQueryResponse if you intend to use this Writer.
      See Also:
  • Constructor Details

    • RawResponseWriter

      public RawResponseWriter()
  • Method Details