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

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

eZ debug

Timing: Jan 18 2025 10:42:52
Script start
Timing: Jan 18 2025 10:42:52
Module start 'content'
Timing: Jan 18 2025 10:42:52
Module end 'content'
Timing: Jan 18 2025 10:42:52
Script end

Main resources:

Total runtime0.1737 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.8594180.8125
Module start 'content' 0.00680.0051 768.671997.8516
Module end 'content' 0.01190.1617 866.5234526.2969
Script end 0.1736  1,392.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.0883200.0002
Check MTime0.00160.9429200.0001
Mysql Total
Database connection0.00171.005010.0017
Mysqli_queries0.126472.72561410.0009
Looping result0.00140.78781390.0000
Template Total0.161492.910.1614
Template load0.00100.593910.0010
Template processing0.160492.303210.1604
Override
Cache load0.00080.440310.0008
Sytem overhead
Fetch class attribute can translate value0.00050.289010.0005
XML
Image XML parsing0.00030.183610.0003
General
dbfile0.00392.2554200.0002
String conversion0.00000.002930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs