[GeoNetwork-users] Adding Custom Search Fields To Geonetwork

Hi everybody

I need add custom search field to geonetwork.

In this moment I configure on index-fields.xsl this code

<xsl:for-each
select="gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString">
          <Field name="autormeta" string="{string(.)}" store="true"
index="true"/>
    </xsl:for-each>

for search by metadata author.

How I do add this as custom search field on geonetwork?

Thanks....

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-Custom-Search-Fields-To-Geonetwork-tp5222995.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi

You need to add in the search form a field with the name autormeta (the
same name as the lucene index field), so when the form is submitted the
value is used by the search service.

The form change depends on the GeoNetwork version you're using and in case
of 2.10, the UI (classic/extjs).

Regards,
Jose García

On Mon, Sep 7, 2015 at 11:49 PM, cbeltran <cbeltran@anonymised.com> wrote:

Hi everybody

I need add custom search field to geonetwork.

In this moment I configure on index-fields.xsl this code

<xsl:for-each

select="gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString">
                        <Field name="autormeta" string="{string(.)}"
store="true"
index="true"/>
                </xsl:for-each>

for search by metadata author.

How I do add this as custom search field on geonetwork?

Thanks....

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Adding-Custom-Search-Fields-To-Geonetwork-tp5222995.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>M: +31 (0)655 818332 <+31655818332>
<https://www.facebook.com/geocatbv&gt; <https://twitter.com/geocat_bv&gt;
<https://plus.google.com/u/1/+GeocatNetbv/posts&gt;Please consider the
environment before printing this email.*

Hi Jose,

Thanks for your reply.

The geonetwork version installed is 2.10.4 with Apache-Tomcat

It works with the config on index-fields.

I need integrate this variable as search field on Geonetwork.

For example:

<http://osgeo-org.1560.x6.nabble.com/file/n5223153/autorgeo2.png&gt;

Thanks.

Regards

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-Custom-Search-Fields-To-Geonetwork-tp5222995p5223153.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

The UI is HTML5.

Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-Custom-Search-Fields-To-Geonetwork-tp5222995p5223154.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi

Check the code for generateAdvancedSearchForm in this file:
https://github.com/geonetwork/core-geonetwork/blob/2.10.x/web-client/src/main/resources/apps/html5ui/js/search/SearchApp.js

That code builds the advanced search form. You can use suggestions, like in
the organisation search field using a similar code for your new field:

https://github.com/geonetwork/core-geonetwork/blob/2.10.x/web-client/src/main/resources/apps/html5ui/js/search/SearchApp.js#L216-L237

You need to checkout the 2.10.4 branch from GitHub and build the web-client
with the changes to add the new field, so the files are minified.

Regards,

On Tue, Sep 8, 2015 at 4:29 PM, cbeltran <cbeltran@anonymised.com> wrote:

Hi Jose,

Thanks for your reply.

The geonetwork version installed is 2.10.4 with Apache-Tomcat

It works with the config on index-fields.

I need integrate this variable as search field on Geonetwork.

For example:

<http://osgeo-org.1560.x6.nabble.com/file/n5223153/autorgeo2.png&gt;

Thanks.

Regards

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Adding-Custom-Search-Fields-To-Geonetwork-tp5222995p5223153.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/&gt;Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>M: +31 (0)655 818332 <+31655818332>
<https://www.facebook.com/geocatbv&gt; <https://twitter.com/geocat_bv&gt;
<https://plus.google.com/u/1/+GeocatNetbv/posts&gt;Please consider the
environment before printing this email.*