Is there a way to change which date field is referenced by the "dateFrom"
and "dateTo" parameters in an xml.search GET request? Or is there another
way to search by a specific date field?
It looks like the field currently being referenced is the date stamp field
that is in the root node of the metadata, but we would like to be able to
search by a publication date field that's within the Identification Info
node.
Any help would be greatly appreciated--I'm quite new to GeoNetwork so I'm
not sure where to start with this.
On Fri, May 22, 2009 at 10:57 PM, Tom B <seileef@anonymised.com> wrote:
Hi,
Is there a way to change which date field is referenced by the "dateFrom"
and "dateTo" parameters in an xml.search GET request? Or is there another
way to search by a specific date field?
It looks like the field currently being referenced is the date stamp field
that is in the root node of the metadata, but we would like to be able to
search by a publication date field that's within the Identification Info
node.
Indeed, "dateFrom" and "dateTo" parameters reference the change date in
store in database.
If you have a look to the lucene.xsl file
(geonetwork/web/geonetwork/xml/search/), you will see the lucene field
related to dateFrom and dateTo parameters. In this case it is _changeDate
which is directly indexed from database in Java source code.
For other search parameters in search form (ie. indexed from metadata and
not from database), you have a specific file to define which metadata
element is indexed for a specific lucene field. You can find this file
(index-fields.xsl) for each schemas define in geonetwork (ie.
/geonetwork/web/geonetwork/xml/schemas/iso19139).
You can easily add a publication date search parameter setting up a new
lucene field.
Here are basically steps to follow :
1) add a new parameter in search form (html/xsl)
2) add a new mapping between this html parameter and lucene field
(lucene.xsl file)
3) add a new index field in index-fields.xsl file
Here is an exemple for revision date for step 3 :
... (inside gmd:identificationInfo loop in index-fields.xsl file)