Package org.apache.solr.scripting.xslt
Class XSLTResponseWriter
- java.lang.Object
-
- org.apache.solr.scripting.xslt.XSLTResponseWriter
-
- All Implemented Interfaces:
QueryResponseWriter
,NamedListInitializedPlugin
public class XSLTResponseWriter extends Object implements QueryResponseWriter
Customize the format of your search results via XSL stylesheet applied to the default XML response format.QueryResponseWriter captures the output of the XMLWriter (in memory for now, not optimal performance-wise), and applies an XSLT transform to it.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CONTENT_TYPE
-
Fields inherited from interface org.apache.solr.response.QueryResponseWriter
CONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8
-
-
Constructor Summary
Constructors Constructor Description XSLTResponseWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType(SolrQueryRequest request, SolrQueryResponse response)
protected Transformer
getTransformer(SolrQueryRequest request)
void
init(org.apache.solr.common.util.NamedList<?> n)
void
write(Writer writer, SolrQueryRequest request, SolrQueryResponse response)
-
-
-
Field Detail
-
DEFAULT_CONTENT_TYPE
public static final String DEFAULT_CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> n)
- Specified by:
init
in interfaceNamedListInitializedPlugin
-
getContentType
public String getContentType(SolrQueryRequest request, SolrQueryResponse response)
- Specified by:
getContentType
in interfaceQueryResponseWriter
-
write
public void write(Writer writer, SolrQueryRequest request, SolrQueryResponse response) throws IOException
- Specified by:
write
in interfaceQueryResponseWriter
- Throws:
IOException
-
getTransformer
protected Transformer getTransformer(SolrQueryRequest request) throws IOException
- Throws:
IOException
-
-