You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Maximilian Hütter <mh...@blue-elephant-systems.com> on 2008/02/15 11:09:45 UTC

Transform Update responses with XSLT?

Hi,

is there a way to transform a Solr update response with a XSLT-Stylesheet?

It looks like the XSLTResponseWriter is only used for searches.

Best regards,

Max

-- 
Maximilian Hütter
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel            :  (+49) 0711 - 45 10 17 578
Fax            :  (+49) 0711 - 45 10 17 573
e-mail         :  max.huetter@blue-elephant-systems.com
Sitz           :  Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer:  Joachim Hörnle, Thomas Gentsch, Holger Dietrich

Re: Transform Update responses with XSLT?

Posted by Maximilian Hütter <mh...@blue-elephant-systems.com>.
Ryan Grange schrieb:
> It is absolutely possible to do such a thing.  I wish I had more time
> right now to create even a sample.  Unfortunately while I'm not too bad
> at XSLT, I haven't used it often enough to whip something up off the top
> of my head with any hope of it working the first time.  I encourage you
> to read up on XSLT creation though as what you're asking is definitely
> doable.  Possible problems I could see would be if you want the XSLT to
> also generate navigation links for you automatically.  Basic formatting
> of the results shouldn't be a problem though.
> 

Thanks for the answer, but I am not sure if you understood what I am
trying to do. I know I can transform the Solr-update response with XSLT.
As it is XML this will always work.
My question is can Solr (out-of-the-box) do this, just as with the
responses from the searchHandler.

How do I configure this? Where does the stylesheet go in the Solr
installation?

The usecase for this is, that users should be able to submit content to
the index and get a response back from Solr. Sure I could wrap all this
parsing the response to an update with an other webapp, but it would be
nice to make it work only with Solr.

Best regards,

Max



Re: Transform Update responses with XSLT?

Posted by Ryan Grange <rg...@dollardays.com>.
It is absolutely possible to do such a thing.  I wish I had more time 
right now to create even a sample.  Unfortunately while I'm not too bad 
at XSLT, I haven't used it often enough to whip something up off the top 
of my head with any hope of it working the first time.  I encourage you 
to read up on XSLT creation though as what you're asking is definitely 
doable.  Possible problems I could see would be if you want the XSLT to 
also generate navigation links for you automatically.  Basic formatting 
of the results shouldn't be a problem though.

Ryan Grange, IT Manager
DollarDays International, LLC
rgrange@dollardays.com
480-922-8155 x106



Maximilian Hütter wrote:
> Hi,
>
> is there a way to transform a Solr update response with a XSLT-Stylesheet?
>
> It looks like the XSLTResponseWriter is only used for searches.
>
> Best regards,
>
> Max
>
>   

Re: Transform Update responses with XSLT?

Posted by Norberto Meijome <fr...@meijome.net>.
On Fri, 15 Feb 2008 11:09:45 +0100
Maximilian Hütter <mh...@blue-elephant-systems.com> wrote:

> Hi,
> 
> is there a way to transform a Solr update response with a XSLT-Stylesheet?
> 
> It looks like the XSLTResponseWriter is only used for searches.
> 
> Best regards,
> 
> Max
> 

Hi Maximilian,
yes, it is definitely doable out of the box.

http://wiki.apache.org/solr/XsltResponseWriter?highlight=%28CategoryQueryResponseWriter%29%7C%28%28CategoryQueryResponseWriter%29%29

I've used it with no problems..but then decided to return to the default XML and let the XSTL transforms in the hands of the web dev guys.

Cheers,
B
_________________________
{Beto|Norberto|Numard} Meijome

"A dream you dream together is reality."
  John Lennon

I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.