[GeoNetwork-users] Adding search parameters

Hi all,

I want to add new parameters to "Advanced search". To do this I added new
fields in search form in main-page.xsl.
After this I modified GN source code:

* 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 new element declaration
       - new "if" instruction for created element (similar to already
existing elements)

At the end I added xml part to file xml/search/lucene.xsl:

<!-- denominator -->
<xsl:call-template name="textField">
   <xsl:with-param name="expr" select="/request/denominator"/>
   <xsl:with-param name="field" select="'denominator'"/>
</xsl:call-template>

Described method works for element gmd:denominator, but only for this
element. I did everything in the same way for elements: gmd:alternateTitle,
gmd:topicCategory, but I get everytime 0 results. What I do wrong or maybe I
missed something ??

Cheers,
Łukasz
--
View this message in context: http://www.nabble.com/Adding-search-parameters-tf4376380s18419.html#a12474323
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hello Lukasz,

Could you tell me which version of Geonetwork you are using?

I am using 2.03 and had to modify the search/iso19115.xsl file as well. I
did not modify fao.geonet.services.main.Search.java.

Also, before the new search items will work you need to stop geonetwork and
clear the index files from the web\WEB-INF\lucerne then restart. This will
allow the new index files to be created.

Cheers,
Byron

Lukasz_Sobotowski wrote:

Hi all,

I want to add new parameters to "Advanced search". To do this I added new
fields in search form in main-page.xsl.
After this I modified GN source code:

* 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 new element declaration
       - new "if" instruction for created element (similar to already
existing elements)

At the end I added xml part to file xml/search/lucene.xsl:

<!-- denominator -->
<xsl:call-template name="textField">
   <xsl:with-param name="expr" select="/request/denominator"/>
   <xsl:with-param name="field" select="'denominator'"/>
</xsl:call-template>

Described method works for element gmd:denominator, but only for this
element. I did everything in the same way for elements:
gmd:alternateTitle, gmd:topicCategory, but I get everytime 0 results. What
I do wrong or maybe I missed something ??

Cheers,
Łukasz

--
View this message in context: http://www.nabble.com/Adding-search-parameters-tf4376380s18419.html#a12486637
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hello ByronC,

I'm using GN 2.1 RC.
I tried to modify xml/search/iso19139.xsl before, but it didn't help. The
clue to solve this problem was clearing lucene index files, only then
changes made in xml/search/iso19139.xsl works.
You were right also about Search.java. There is no need to modify
fao.geonet.services.main.Search.java file. It works fine without it.

Thanks for your help.

ByronC wrote:

Hello Lukasz,

Could you tell me which version of Geonetwork you are using?

I am using 2.03 and had to modify the search/iso19115.xsl file as well. I
did not modify fao.geonet.services.main.Search.java.

Also, before the new search items will work you need to stop geonetwork
and clear the index files from the web\WEB-INF\lucerne then restart. This
will allow the new index files to be created.

Cheers,
Byron

Lukasz_Sobotowski wrote:

Hi all,

I want to add new parameters to "Advanced search". To do this I added new
fields in search form in main-page.xsl.
After this I modified GN source code:

* 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 new element declaration
       - new "if" instruction for created element (similar to already
existing elements)

At the end I added xml part to file xml/search/lucene.xsl:

<!-- denominator -->
<xsl:call-template name="textField">
   <xsl:with-param name="expr" select="/request/denominator"/>
   <xsl:with-param name="field" select="'denominator'"/>
</xsl:call-template>

Described method works for element gmd:denominator, but only for this
element. I did everything in the same way for elements:
gmd:alternateTitle, gmd:topicCategory, but I get everytime 0 results.
What I do wrong or maybe I missed something ??

Cheers,
Łukasz

--
View this message in context: http://www.nabble.com/Adding-search-parameters-tf4376380s18419.html#a12496516
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hallo Łukasz,

do i have to compile GN by myself to change the search functions? I have
batch imported metadata files, which are not displayed in GN, but are
visible in the Postgres database. I think thats because the metadata is not
fully completed. Now i wanted to force Geonetwork to show all metadata. You
have an idea how to do that?

thanks ans best regards

roger mrzygŁocki (PL)

Lukasz_Sobotowski wrote:

Hi all,

I want to add new parameters to "Advanced search". To do this I added new
fields in search form in main-page.xsl.
After this I modified GN source code:

* 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 new element declaration
       - new "if" instruction for created element (similar to already
existing elements)

At the end I added xml part to file xml/search/lucene.xsl:

<!-- denominator -->
<xsl:call-template name="textField">
   <xsl:with-param name="expr" select="/request/denominator"/>
   <xsl:with-param name="field" select="'denominator'"/>
</xsl:call-template>

Described method works for element gmd:denominator, but only for this
element. I did everything in the same way for elements:
gmd:alternateTitle, gmd:topicCategory, but I get everytime 0 results. What
I do wrong or maybe I missed something ??

Cheers,
Łukasz

--
View this message in context: http://www.nabble.com/Adding-search-parameters-tp12474323s18419p15529154.html
Sent from the geonetwork-users mailing list archive at Nabble.com.