tags:

views:

212

answers:

1

Hi,

I want to format the solr result page instead of just a xml- show a user only ten results at a time (one page) and provide links for the next or previous page of results.

And add some css . where and how do i do it?

Please guide me. Thanks in advance.

A: 

Hey, you can use the XsltReponseWriter. Which is documented here:

http://wiki.apache.org/solr/XsltResponseWriter

Here's an example which turns solr's resonse into an atom feed:

http://github.com/mcelona/acts_as_solr/blob/f17f14f0da613d45bfbea595631bafb436f6d99e/solr/solr/conf/xslt/example_atom.xsl

You could use the header information that solr provides to help with paging.

<str name="rows">10</str>
<result name="response" numFound="8104" start="0">
CraftyFella