Time for action – writing a new ResponseWriter plugin with the Thymeleaf library

There are many options for new customizations, depending on your use cases, and the continuous evolution of the framework is still simplifying things and making room for new improvements. For example, I feel that it is interesting to adapt the very flexible Thymeleaf template system to play with Solr as a ResponseWriter.

Note

Thymeleaf is a Java XML/XHTML/HTML5 template engine. It can serve XHTML/HTML5 in web applications or process any XML file: http://www.thymeleaf.org/.

  1. A basic outline of the source should be similar to the following code:
    class ThymeleafResponseWriter extends QueryResponseWriter {
      
     override def getContentType(request: SolrQueryRequest, response: ...

Get Apache Solr Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.