♻️ this is the official and maintained fork of the original @shopping24 repository maintained by solr.cool.
A Solr component to use the Thymeleaf template engine.
-
Place the
solr-thymeleaf-<VERSION>-jar-with-dependencies.jar
in the/lib
directory of your Solr installation. -
Configure the component in your
solrconfig.xml
:
Pass the template to render in the tl.template
request parameter. You can configure Thymeleaf template resolving:
<queryResponseWriter name="html" class="cool.solr.response.ThymeleafResponseWriter">
<str name="tl.templateMode">XHTML</str>
<str name="tl.locale">de_de</str>
<str name="tl.cacheTTLMs">3600000</str>
<str name="tl.prefix">${solr.core.config}/templates/</str>
<str name="tl.suffix">.html</str>
</queryResponseWriter>
The template context is prefilled with the current request
, the request params
and a solr response
.
This should install the current version into your local repository
$ ./mvn clean verify
This project is licensed under the Apache License, Version 2.