Format of XML Search Results

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

Format of XML Search Results

antwatkins
Hello,

First, great work on the clustering system.  It appears to fit my customer's needs quite well.  I am currently updating the UI to brand it to appear like the rest of our site.  I have started to edit the related XSLTs (page.xslt and document.xslt in common-dynamic and common), but to facilitate the process, it would be very helpful if I had a copy of the xml result that was being transformed.  

I have looked throughout the forums, in the user guide, and performed google searches and I can not find a sample of the xml format.  The common directory in skins has a template-document.xml file, but it only contains the document element node.  The XSLT calls many elements and attributes (e.g. - page element and query attribute) that are not found in that document.

Is there someplace I can find a source XML document that is being transformed or perhaps a call I can make to the server to return me the raw results prior to transformation?  Also, what point in the source code does the transformation occur (i.e. - where is the point the the transformation engine calls my custom XSLT to run against the Page result XML file)?  Oh, I am using SOLR as my source document if that helps to answer my question.

Thanks for your time and assistance.

Regards,

Anthony
Reply | Threaded
Open this post in threaded view
|

Re: Format of XML Search Results

Stanislaw Osinski
Administrator
Hi Anthony,

Is there someplace I can find a source XML document that is being
transformed or perhaps a call I can make to the server to return me the raw
results prior to transformation?  Also, what point in the source code does
the transformation occur (i.e. - where is the point the the transformation
engine calls my custom XSLT to run against the Page result XML file)?  Oh, I
am using SOLR as my source document if that helps to answer my question.

The XSLT is applied by a filter defined here:

http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-webapp/web/WEB-INF/web.template.xml?r=3224#l104

If you look at the mapping, the filter applies only to the /search servlet mount point, while the /xml mount point is not processed through the filter. So to see the XMLs based on which the HTMLs are generated, you just need to replace /search with /xml in the url, e.g.:

http://search.carrot2.org/stable/xml

If you open that URL in directly in a browser, you'll see an error (http://issues.carrot2.org/browse/CARROT-500), but if you fetch the URL with wget, you'll get the XML. If you'd like to peek into the XMLs with clusters and documents, use Firebug to get the AJAX call URLs and replace /search with /xml in them.

Incidentally, if the application you're building is going to be public, I'd love to see it in action when your done :-)

Cheers,

S.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Format of XML Search Results

antwatkins
Wow, thanks for the lightening fast response.  It's much appreciated.  Unfortunately, the app will not be public, but I will see what I can get approval to show you directly.

Thanks again for your help.

Regards,

Anthony


Stanislaw Osinski wrote
Hi Anthony,

Is there someplace I can find a source XML document that is being
> transformed or perhaps a call I can make to the server to return me the raw
> results prior to transformation?  Also, what point in the source code does
> the transformation occur (i.e. - where is the point the the transformation
> engine calls my custom XSLT to run against the Page result XML file)?  Oh,
> I
> am using SOLR as my source document if that helps to answer my question.


The XSLT is applied by a filter defined here:

http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-webapp/web/WEB-INF/web.template.xml?r=3224#l104

If you look at the mapping, the filter applies only to the /search servlet
mount point, while the /xml mount point is not processed through the filter.
So to see the XMLs based on which the HTMLs are generated, you just need to
replace /search with /xml in the url, e.g.:

http://search.carrot2.org/stable/xml

If you open that URL in directly in a browser, you'll see an error (
http://issues.carrot2.org/browse/CARROT-500), but if you fetch the URL with
wget, you'll get the XML. If you'd like to peek into the XMLs with clusters
and documents, use Firebug to get the AJAX call URLs and replace /search
with /xml in them.

Incidentally, if the application you're building is going to be public, I'd
love to see it in action when your done :-)

Cheers,

S.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Format of XML Search Results

Stanislaw Osinski
Administrator
Wow, thanks for the lightening fast response.  It's much appreciated.
Unfortunately, the app will not be public, but I will see what I can get
approval to show you directly.

That's not a problem, Anthony, I was just curious :-)

S.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers