Hi GeoNetwork users,
I'm new on this software and I've recently installed the current release (v.2.10.3).
I'm trying to create a new metadata schema plugin for GeoNetwork on Earth Observation products (i.e. OGC 10-025r1 : Earth Observation Metadata profile of Observations & Measurements v.2.0) following the steps described within the Developer Manual.
The actual state of the art is that the new plugin "om-2_0_0" has been deployed correctly under the schema_plugins directory with all the mandatory information needed for metadata ingestion purposes (i.e. original schemas, and .xsl files) ... but I didn't work a lot on the presentation part.
I've mapped some textual fields inside the plugin index-fields.xsl but I've got an issue on making queryable a numeric field with lucene (i.e. Cloud Coverage Percentage, double) for doing range queries.
The steps I've made are described as follows:
- In the plugin index-fields.xsl file I've added the snippet code:
<xsl:for-each select="om:result/opt:EarthObservationResult/opt:cloudCoverPercentage">
<Field name="cloudCoverPercentage" string="{string(.)}" store="true" index="true"/>
</xsl:for-each>
- Under WEB-INF I've added the following snippet code in config-lucene.xml file:
<numeric>
...
<Field name="cloudCoverPercentage" type="double"/>
</numeric>
- Under WEB-INF I've added the following snippet code in lucene.xml file following the implementation of "tempExtentBegin" reported inside this file:
<xsl:if test="(/request/cloudCoverPercentageMin or /request/cloudCoverPercentageMax)">
<BooleanClause required="true" prohibited="false">
<BooleanQuery>
<BooleanClause required="false" prohibited="false">
<RangeQuery fld="cloudCoverPercentage" inclusive="true">
<xsl:if test="/request/cloudCoverPercentageMin">
<xsl:attribute name="lowerTxt">
<xsl:value-of select="/request/cloudCoverPercentageMin"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="/request/cloudCoverPercentageMax">
<xsl:attribute name="upperTxt">
<xsl:value-of select="/request/cloudCoverPercentageMax"/>
</xsl:attribute>
</xsl:if>
</RangeQuery>
</BooleanClause>
</BooleanQuery>
</BooleanClause>
</xsl:if>
Then in the administration section I've executed the "Rebuild/Optimize/Reload Lucene index" and then tried the following http queries:
- http://<host>:<port>/geonetwork/srv/eng/q?cloudCoverPercentageMin=30&cloudCoverPercentageMax=70<http://%3chost%3e:%3cport%3e/geonetwork/srv/eng/q?cloudCoverPercentageMin=30&cloudCoverPercentageMax=70>
- http://mazinga.planetek.it:9040/geonetwork/srv/eng/xml.search?cloudCoverPercentageMin=60&cloudCoverPercentageMax=70
But it results on "no records", when I'm sure that some are present under such filter.
What I'm doing wrong?
Can someone give me some hints?
Thanks in advance for your help.
Nick.