[ http://issues.apache.org/jira/browse/SOLR-16?page=comments#action_12413045 ]
Hoss Man commented on SOLR-16: ------------------------------ I think the right solution is to refactor the writer selection logic you added to the SolrServlet into a method in SolrCore... public QueryResponseWriter getQueryResponseWriter(String handlerName) ...i would also suggest adding another new method that calls that one... public QueryResponseWriter getQueryResponseWriter(SolrQueryRequest) ...and put the query param checking and default writer fallback logic in there. Then change SolrServlet and the TestHarness to call that. How does that sound? (One other small thing now that I'm looking at the patch a little more closely: when handling exceptions, SolrException.logOnce is probably a better choice then ex.printStackTrace() -- that way the logging information goes wherever the ServletContainer has it's logging configured to instead of just STDERR) > patch to allow the use of a custom query output writer > ------------------------------------------------------ > > Key: SOLR-16 > URL: http://issues.apache.org/jira/browse/SOLR-16 > Project: Solr > Type: New Feature > Components: search > Reporter: Mike Baranczak > Attachments: custom_writer.patch, custom_writer_rev2.patch > > This patch allows users to create their own implementation of > QueryResponseWriter, and specify that class in solrconfig.xml. The default > behavior is to use XMLResponseWriter like before. The class selection code > only runs once at servlet init time, so it shouldn't have any measurable > effect on performance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
