Hi,
I was trying to add new range search parameter, but I found it difficult. I
want to search for TimeInstant (ISO19139), but in a advanced search I want
to write since-date and to-date in two different textboxes (I don't know if
it's good idea, maybe there is better solution).
I've made it like I would try to add normal parameter:
* fao.geonet.constants.Geonet.java
- added new search element
* fao.geonet.services.util.MainUtil.java
- added new element to array "elData"
- added new element declaration
- added new String declaration
- new "if" instruction for created element (similar to already
existing elements)
* fao.geonet.services.main.Search.java
- added code to join two parameters (since, to) in TimeInstant and
save it in params element
In XSL files:
* xsl\main-page.xsl
- added two inputs for since-date and to-date (TimeInstantSince and
TimeInstantTo)
- added one hidden inputs (TimeInstant) for joined since-data and
to-data (for example: 2002 TO 2006 -> I think RangeQuery should look like
that)
* xml\search\iso19139.xsl
- added in "Data Identification" loop:
<xsl:for-each
select="gmd:extent/gmd:EX_extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gmd:TimeInstant/gmd:timePosition">
<Field name="TimeInstant" string="{string(.)}" store="true"
index="true" token="false"/>
</xsl:for-each>
* xml\search\lucene.xsl,
AND HERE I've got some problem to define this parameter. I've tried to
define it like this but it doesn't work:
<xsl:if test="string(/request/TimeInstantSince) != '' and
string(/request/TimeInstantTo) != ''">
<BooleanClause required="true" prohibited="false">
<RangeQuery fld="TimeInstant"
lowerTxt="string(/request/TimeInstantSince)"
upperTxt="string(/request/TimeInstantTo)"
inclusive="true"/>
</BooleanClause>
</xsl:if>
How to make such search parameter?? I will be gratefull for any suggestions.
Cheers,
Łukasz
--
View this message in context: http://www.nabble.com/how-to-add-new-range-search-parameter---tp17754195p17754195.html
Sent from the geonetwork-users mailing list archive at Nabble.com.