O'Reilly logo

Apache Solr 3 Enterprise Search Server by Eric Pugh, David Smiley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using XSLT to expose Solr via OpenSearch

A relatively unknown, but powerful way to integrate with Solr is via its support for XSLT, eXtensible Stylesheet Language Transformations. XSLT is a specification for transforming XML documents into other XML formats, which includes HTML. There are various implementations of this specification and Java includes one. Solr provides a query response writer that executes a provided XSLT stylesheet, to transform Solr's XML search results into some other format. Solr comes with a couple of examples in ./conf/xslt/. Here is an example of transforming search results into an RSS feed:

http://localhost:8983/solr/mbartists/select/?q=marley&wt=xslt&tr=example_rss.xsl

The wt parameter triggers the use of XSLT, and the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required