I am writing a custom RequestHandler by extending RequestHandlerBase.  I
would like this request handler to perform some work and then write the
response using the VelocityResponseWriter.  I am just getting started so
currently my custom RequestHandler looks like this:

@Override
public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
response) throws Exception {
    log.info("I'm here");
}

 I have added the following to solrconfig.xml:

<requestHandler name="/notes" class="linc.notes.NotesManager">
    <lst name="defaults">
        <str name="wt">velocity</str>
        <str name="v.contentType">text/xml;charset=UTF-8</str>
        <str name="v.template">browse</str>
        <str name="v.layout">layout</str>
    </lst>
</requestHandler>

Right now I get the default xml response in my browser:
<response time="3">
<facets> </facets>
<results count="0" page-num="0" page-count="0"> </results>
</response>

Why doesn't it use VelocityResponseWriter and display the browse template
like I have specified?  Do I need to tell it which writer to use.  I assumed
that was being done by some base class by examining the wt param.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Writing-response-from-custom-RequestHandler-tp2936178p2936178.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to