Search facet for groupowner name

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Search facet for groupowner name

Jo Cook
Hi,

In geonetwork 3.4.x I would like to to configure a search facet for
groupowner that uses name rather than ID. config-summary.xml has a facet
for groupowner and has a filter defined in the contribute tab for it (
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/web/src/main/webapp/WEB-INF/config-summary.xml#L172)
but that seems to give me the numeric id for the group. I might be
approaching this the wrong way,but
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/domain/src/main/java/org/fao/geonet/repository/GroupRepository.java
suggests there's a findByName method that I can use, but this doesn't seem
to work- I still just see the numeric ids.

So... I've read the documentation at
https://geonetwork-opensource.org/manuals/3.4.x/en/customizing-application/configuring-search-fields.html#configuring-search-fields
and I'm wondering if I have to add this to the index, which seems like a
lot of work just to be able to display the name rather than the id in the
search facet.

Then I started looking at the publishedForGroup facet- and tried to set it
up in the same way as that one, since that displays names and not IDs but
I'm still only seeing IDs.

Could someone clarify the correct approach for me please, and secondly
confirm what the difference is between groupOwner and publishedForGroup?

Thanks

Jo

--
*Jo Cook*
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent
responses at that time, please visit support.astuntechnology.com or phone
our office on 01372 744009

--
-- 
*
Reserve your conference place now:  *Bristol 26 Sept
<https://www.eventbrite.co.uk/e/astun-conference-bristol-tickets-46763717538>* 
| *Leeds 3rd October
<https://www.eventbrite.co.uk/e/astun-conference-leeds-tickets-46763825862>

*
*
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd, The
Coach House, 17 West Street, Epsom, Surrey, KT18 7RL, UK 
t:+44 1372 744
009 w: astuntechnology.com <http://astuntechnology.com/> twitter:@astuntech
<https://twitter.com/astuntech>



iShare - enterprise geographic
intelligence platform <https://astuntechnology.com/ishare/>
GeoServer,
PostGIS and QGIS training <https://astuntechnology.com/services/#training>

Helpdesk and customer portal
<http://support.astuntechnology.com/support/login>




Company registration
no. 5410695. Registered in England and Wales. Registered office: 120 Manor
Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Search facet for groupowner name

Jose Garcia
Hi Jo

The definition looks fine, it uses the indexed value groupOwner (integer)
and the translator, uses that value to get the translation label.

      <item facet="groupOwner" max="199" sortBy="value"

translator="db:org.fao.geonet.repository.GroupRepository:findOne:int"/>

If you go to  http://SERVER/geonetwork/srv/eng/catalog.edit#/board, you
should see a facet GROUPS, that uses that facet item and should show the
label of the group.

See in https://vanilla.geocat.net/geonetwork/srv/eng/catalog.edit#/board,
group names are displayed


Have you check the log fine if contains any entry that can be relevant to
the issue?


Regards,
Jose García

On Fri, Aug 10, 2018 at 1:51 PM, Jo Cook <[hidden email]> wrote:

> Hi,
>
> In geonetwork 3.4.x I would like to to configure a search facet for
> groupowner that uses name rather than ID. config-summary.xml has a facet
> for groupowner and has a filter defined in the contribute tab for it (
> https://github.com/geonetwork/core-geonetwork/blob/3.4.x/
> web/src/main/webapp/WEB-INF/config-summary.xml#L172)
> but that seems to give me the numeric id for the group. I might be
> approaching this the wrong way,but
> https://github.com/geonetwork/core-geonetwork/blob/3.4.x/
> domain/src/main/java/org/fao/geonet/repository/GroupRepository.java
> suggests there's a findByName method that I can use, but this doesn't seem
> to work- I still just see the numeric ids.


> So... I've read the documentation at
> https://geonetwork-opensource.org/manuals/3.4.x/en/
> customizing-application/configuring-search-fields.
> html#configuring-search-fields
> and I'm wondering if I have to add this to the index, which seems like a
> lot of work just to be able to display the name rather than the id in the
> search facet.
>
> Then I started looking at the publishedForGroup facet- and tried to set it
> up in the same way as that one, since that displays names and not IDs but
> I'm still only seeing IDs.
>
> Could someone clarify the correct approach for me please, and secondly
> confirm what the difference is between groupOwner and publishedForGroup?
>
> Thanks
>
> Jo
>
> --
> *Jo Cook*
> t:+44 7930 524 155/twitter:@archaeogeek
> Please note that currently I do not work on Friday afternoons. For urgent
> responses at that time, please visit support.astuntechnology.com or phone
> our office on 01372 744009
>
> --
> --
> *
> Reserve your conference place now:  *Bristol 26 Sept
> <https://www.eventbrite.co.uk/e/astun-conference-bristol-
> tickets-46763717538>*
> | *Leeds 3rd October
> <https://www.eventbrite.co.uk/e/astun-conference-leeds-tickets-46763825862
> >
>
> *
> *
> *Sign up to our mailing list
> <https://astuntechnology.com/company/#email-updates> for updates on news,
> products, conferences, events and training*
> *
> *
>
> Astun Technology Ltd, The
> Coach House, 17 West Street, Epsom, Surrey, KT18 7RL, UK
> t:+44 1372 744
> 009 w: astuntechnology.com <http://astuntechnology.com/>
> twitter:@astuntech
> <https://twitter.com/astuntech>
>
>
>
> iShare - enterprise geographic
> intelligence platform <https://astuntechnology.com/ishare/>
> GeoServer,
> PostGIS and QGIS training <https://astuntechnology.com/services/#training>
>
> Helpdesk and customer portal
> <http://support.astuntechnology.com/support/login>
>
>
>
>
> Company registration
> no. 5410695. Registered in England and Wales. Registered office: 120 Manor
> Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> 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/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv>
<https://twitter.com/geocat_bv>
<https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the
environment before printing this email.*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Search facet for groupowner name

Jo Cook
Hi Jose,

Thanks, I got this to work eventually, I had cleared the cache from the
admin interface and was running geonetwork in a chrome incognito browser,
I needed to manually delete the wro4j cache.

Jo

On Thu, Aug 16, 2018 at 8:33 AM, Jose Garcia <[hidden email]> wrote:

> Hi Jo
>
> The definition looks fine, it uses the indexed value groupOwner (integer)
> and the translator, uses that value to get the translation label.
>
>       <item facet="groupOwner" max="199" sortBy="value"
>             translator="db:org.fao.geonet.repository.GroupRepository:
> findOne:int"/>
>
> If you go to  http://SERVER/geonetwork/srv/eng/catalog.edit#/board, you
> should see a facet GROUPS, that uses that facet item and should show the
> label of the group.
>
> See in https://vanilla.geocat.net/geonetwork/srv/eng/catalog.edit#/board,
> group names are displayed
>
>
> Have you check the log fine if contains any entry that can be relevant to
> the issue?
>
>
> Regards,
> Jose García
>
> On Fri, Aug 10, 2018 at 1:51 PM, Jo Cook <[hidden email]>
> wrote:
>
>> Hi,
>>
>> In geonetwork 3.4.x I would like to to configure a search facet for
>> groupowner that uses name rather than ID. config-summary.xml has a facet
>> for groupowner and has a filter defined in the contribute tab for it (
>> https://github.com/geonetwork/core-geonetwork/blob/3.4.x/web
>> /src/main/webapp/WEB-INF/config-summary.xml#L172)
>> but that seems to give me the numeric id for the group. I might be
>> approaching this the wrong way,but
>> https://github.com/geonetwork/core-geonetwork/blob/3.4.x/dom
>> ain/src/main/java/org/fao/geonet/repository/GroupRepository.java
>> suggests there's a findByName method that I can use, but this doesn't seem
>> to work- I still just see the numeric ids.
>
>
>> So... I've read the documentation at
>> https://geonetwork-opensource.org/manuals/3.4.x/en/customizi
>> ng-application/configuring-search-fields.html#configuring-search-fields
>> and I'm wondering if I have to add this to the index, which seems like a
>> lot of work just to be able to display the name rather than the id in the
>> search facet.
>>
>> Then I started looking at the publishedForGroup facet- and tried to set it
>> up in the same way as that one, since that displays names and not IDs but
>> I'm still only seeing IDs.
>>
>> Could someone clarify the correct approach for me please, and secondly
>> confirm what the difference is between groupOwner and publishedForGroup?
>>
>> Thanks
>>
>> Jo
>>
>> --
>> *Jo Cook*
>> t:+44 7930 524 155/twitter:@archaeogeek
>> Please note that currently I do not work on Friday afternoons. For urgent
>> responses at that time, please visit support.astuntechnology.com or phone
>> our office on 01372 744009
>>
>> --
>> --
>> *
>> Reserve your conference place now:  *Bristol 26 Sept
>> <https://www.eventbrite.co.uk/e/astun-conference-bristol-tic
>> kets-46763717538>*
>> | *Leeds 3rd October
>> <https://www.eventbrite.co.uk/e/astun-conference-leeds-ticke
>> ts-46763825862>
>>
>> *
>> *
>> *Sign up to our mailing list
>> <https://astuntechnology.com/company/#email-updates> for updates on
>> news,
>> products, conferences, events and training*
>> *
>> *
>>
>> Astun Technology Ltd, The
>> Coach House, 17 West Street, Epsom, Surrey, KT18 7RL, UK
>> <https://maps.google.com/?q=17+West+Street,+Epsom,+Surrey,+KT18+7RL,+UK&entry=gmail&source=g>
>>
>> t:+44 1372 744
>> 009 w: astuntechnology.com <http://astuntechnology.com/>
>> twitter:@astuntech
>> <https://twitter.com/astuntech>
>>
>>
>>
>> iShare - enterprise geographic
>> intelligence platform <https://astuntechnology.com/ishare/>
>> GeoServer,
>> PostGIS and QGIS training <https://astuntechnology.com/services/#training
>> >
>>
>> Helpdesk and customer portal
>> <http://support.astuntechnology.com/support/login>
>>
>>
>>
>>
>> Company registration
>> no. 5410695. Registered in England and Wales. Registered office: 120
>> Manor
>> <https://maps.google.com/?q=120+Manor++%0D%0AGreen+Road,+Epsom,+Surrey,+KT19+8LN&entry=gmail&source=g>
>> Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> GeoNetwork-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
>> GeoNetwork OpenSource is maintained at http://sourceforge.net/project
>> s/geonetwork
>>
>
>
>
> --
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Vriendelijke groeten / Kind regards,Jose García
> <http://www.geocat.net/>Veenderweg 13
> <https://maps.google.com/?q=Veenderweg+13+6721+WD+Bennekom+The+Netherlands&entry=gmail&source=g>6721
> WD Bennekom
> <https://maps.google.com/?q=Veenderweg+13+6721+WD+Bennekom+The+Netherlands&entry=gmail&source=g>The
> Netherlands
> <https://maps.google.com/?q=Veenderweg+13+6721+WD+Bennekom+The+Netherlands&entry=gmail&source=g>T: +31
> (0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv>
> <https://twitter.com/geocat_bv>
> <https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the
> environment before printing this email.*
>



--
*Jo Cook*
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent
responses at that time, please visit support.astuntechnology.com or phone
our office on 01372 744009

--
-- 
*
Reserve your conference place now:  *Bristol 26 Sept
<https://www.eventbrite.co.uk/e/astun-conference-bristol-tickets-46763717538>* 
| *Leeds 3rd October
<https://www.eventbrite.co.uk/e/astun-conference-leeds-tickets-46763825862>

*
*
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd, The
Coach House, 17 West Street, Epsom, Surrey, KT18 7RL, UK 
t:+44 1372 744
009 w: astuntechnology.com <http://astuntechnology.com/> twitter:@astuntech
<https://twitter.com/astuntech>



iShare - enterprise geographic
intelligence platform <https://astuntechnology.com/ishare/>
GeoServer,
PostGIS and QGIS training <https://astuntechnology.com/services/#training>

Helpdesk and customer portal
<http://support.astuntechnology.com/support/login>




Company registration
no. 5410695. Registered in England and Wales. Registered office: 120 Manor
Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork