SOLR uses response writers to convert a SOLR response in to the desired output format. There are various response writers you can use right out of the box and you can control which one is used via command line parameters or via solrconfig.xml file. Ie. wt=xml, wt=json, wt=velocity The VelocityResponseWriter class has a hard coded list of tools that it injects in to the context. I don't know what version of velocity you are using but the link below is the source of the VelocityResponseWriter for version 3.5. I'm sure later versions of this class are similar. I have a custom version of this class in my project that only injects the tools I use/need.
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.solr/solr-velocity/3.5.0/org/apache/solr/response/VelocityResponseWriter.java -----Original Message----- From: phi...@free.fr [mailto:phi...@free.fr] Sent: Thursday, February 19, 2015 8:03 AM To: Velocity Users List Subject: Re: $link Hi, I am using the SOLR version of Velocity, running in Tomcat, which doesn't seem to have a toolbox.xml file. I have manually created such a file, and added it to ...apache-tomcat-8.0.15/webapps/solr/WEB-INF but to no avail. Philippe ----- Mail original ----- De: "Mike Kienenberger" <mkien...@gmail.com> À: "Velocity Users List" <user@velocity.apache.org> Envoyé: Jeudi 19 Février 2015 14:30:14 Objet: Re: $link Add "link" to your velocity toolbox.xml file. If you search for "<key>math</key>", you should be able to find the file and then add a new entry for "link" See LinkTool.html for more information specific to link. http://velocity.apache.org/tools/devel/view/LinkTool.html See config.html for general information on tool configuration. http://velocity.apache.org/tools/releases/2.0/config.html On Thu, Feb 19, 2015 at 5:59 AM, <phi...@free.fr> wrote: > Hi, > > how do you access $link in velocity templates? > > I have access to $math, but not link. > > Many thanks. > > Philippe > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org