Hi,
in recent years there has been some discussion about broken Z39.50
support in Geonetwork. In particular, the date search functionality
was reported to be missing. This email explains how to fix the date
search for the Z39.50 interface in Geonetwork.
For a clean installation it should be sufficient to replace the
web/geonetwork/xml/search/z3950Server.xsl with the attached version.
No code change is required.
The file also fixes title and keyword/subject/topicat, mapping them to
the corresponding Geonetowrk lucene indices.
A more detailed explanation, which can serve as a guideline to implement
further dates, follows.
In order to enable the Z39.50 date-search the following procedure has to
be followed.
1) modify xml/search/z3950Server.xsl to map date queries to the
geonetwork internal XML lucene query format.
- XSLT template "dateTerm" (of z3959Server.xsl) maps Z39.50
greater/smaller etc.. to lucene range queries with infinite past and
future dates.
- call the template from selected use attributes (we use 30,1012).
(sections createDate and changeDate in z3950Server.xsl)
2) configure the right lucene indices. It is not totally clear which
indices have to be searched for use attributes 30 and 1012 (see:
http://n2.nabble.com/clarification-on-dates-possible-bug-td4073673.html).
In our implementation we use "_changeDate" and "_createDate", but
"createDate" could also be used.
To configure the indices, change parameter "field" when calling the
"dateTerm" template. (to find out which fields are actually indexed,
e.G the lucene index viewer "luke" can be used, or look at
xml/schemas/*/index-fields.xsl)
Please note that only searching for dates is supported (time
specifications are truncated), due to the bug discussed in above
mentioned posting.
The fix should be seen as a way of enabling Z39.50 date-search without
migrating to a newer version nor changing the sourcecode.
A more sophisticated Z39.50 version, supporting higher resolution
time-queries" will be proposed to be merged into trunk, soon.
please let us know if you have any issues with Z39.50 date search,
as we are trying to make the standard better supported.
best regards
Timo
(attachments)
z3950Server.xsl (13 KB)