Transform Update responses with XSLT?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Transform Update responses with XSLT?

Max Hütter
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         :  [hidden email]
Sitz           :  Stuttgart, Amtsgericht Stuttgart, HRB 24106
Geschäftsführer:  Joachim Hörnle, Thomas Gentsch, Holger Dietrich
Reply | Threaded
Open this post in threaded view
|

Re: Transform Update responses with XSLT?

Ryan Grange-2
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
[hidden email]
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
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Transform Update responses with XSLT?

Max Hütter
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


Reply | Threaded
Open this post in threaded view
|

Re: Transform Update responses with XSLT?

Norberto Meijome-2
In reply to this post by Max Hütter
On Fri, 15 Feb 2008 11:09:45 +0100
Maximilian Hütter <[hidden email]> 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.