On May 28, 2009, at 9:52 AM, Jörg Agatz wrote:
I Tryed to create a Sort button unter the SearchForm...

i would like to sort : "score" and "date"  so i musst use the Link:

* http://192.168.105.54:8983/solr/itas?q=SEARCHWORD&sort=date asc*
and
*http://192.168.105.54:8983/solr/itas?q=SEARCHWORD&sort=date desc
*
and the Same with score, but i dont know how i get the "q=SEARCHWORD"

in XLST i know ihow i get thm but in Solrtis, i dosent

You can get at lots of stuff from the $response object. See the references in the VelocityResponseWriter wiki page. For example, you can get the q parameter like this: $response.responseHeader.params.q

To use it in a URL, you'll want to URL escape it: $! esc.url($response.responseHeader.params.q)

You'll also want to escape the sort parameter, as &sort=date+asc

One thing that is tricky, and XSLT doesn't make this any easier, is keeping some context in the links generated so you have the current query, sort, and filtering context for previous/next pages, etc.

Hope that helps.

        Erik

Reply via email to