Import XML (SRW, “Search/Retrieve Web Service Protocol”)

Author Message

Urs °

Monday 16 July 2007 2:52:08 am

We have an external search application based on lucene und we discuss now how we get the search results into our new website. It seems that the XML standard ( SRW: http://de.wikipedia.org/wiki/Z39.50_International_Next_Generation ) might be a good solution. Is there a possibility to import an XML file (SRW) in eZ publish? Can you recommend an extension or support document which explains how I can do it?
many thanks

Michael Maclean

Monday 16 July 2007 4:45:08 am

SRW isn't currently available in eZ, but it's fairly easy to handle XML-based protocols using an extension. I suspect that the way to go about it might be to write a template fetch operator, a bit like the one in this tutorial:

http://ez.no/ezpublish/documentation/development/extensions/building_an_ez_publish_module

You could write code in PHP to handle creating and executing the queries, and then return results which can then be displayed using the template system as normal. If you were to go down this route, I'm sure that other people would be interested in using it.

There is also an existing Lucene extension for eZ, which is in Subversion here: http://pubsvn.ez.no/community/trunk/extension/lucene/ , however it has since been deprecated in favour of a system based on Solr: http://projects.ez.no/ezsolr.

eZpedia community documentation project | http://ezpedia.org

Urs °

Monday 16 July 2007 5:24:30 am

Hi Michael
thanks for the quick answer.

We can't use a lucene extension because we develop our own lucene search (extern). Have you any experience with SRW? Can you recommend it or would you use another XML standard, in example with the extension "Import XML Data"?

http://ez.no/community/contribs/import_export/import_xml_data

Thanks
Urs

Michael Maclean

Monday 16 July 2007 7:04:21 am

I haven't used it myself, though it looks interesting. That Import XML contribution is designed to import a set of content objects from an XML file, for permanent display in the site, if you see what I mean - it could be used to restore a site from a backup, perhaps.

I think however if you're running a search server, you will want to search based on form input, or other dynamic information, for which you will need to write some kind of interface to the search service. I think the template fetch operator is the best way to go here, or perhaps you could write a module with a view that does all the work before the page is loaded.

I think I'll edit this post when I've thought of a clearer way of expressing what I mean...

eZpedia community documentation project | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.