geonetwork / geonetwork/core-geonetwork

Group name edit and group info indexing in Lucene

Open
#4,485 0 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Java
Stars
521
Forks
514
Avg merge
6d 13h
Merged PRs (30d)
19

Description

The lucene field `_groupPublished` stores the group name instead of the group identifier (as it's done for `_groupOwner`), this is problematic if the group name is changed as the Lucene index is not updated.

This field is used for the facet filters and in:

https://github.com/geonetwork/core-geonetwork/blob/c0855205156ec0f8a6cb062071e9ac2afbd9a157/web/src/main/webapp/xslt/ui-search/search-nojs.xsl#L77

https://github.com/geonetwork/core-geonetwork/blob/c0855205156ec0f8a6cb062071e9ac2afbd9a157/web-ui/src/main/resources/catalog/templates/admin/settings/csw-virtual.html#L122

To check:

1) Store the group identifier and review/update the code using this field

2) Update the metadata indexing when saving a group, if a name change is identified (similar as it's done when a group is deleted:

https://github.com/geonetwork/core-geonetwork/blob/c0855205156ec0f8a6cb062071e9ac2afbd9a157/services/src/main/java/org/fao/geonet/api/groups/GroupsApi.java#L536-L549

Option 1) sounds a better approach to me.

Contributor guide

Open the contributing guide

Research direction

Start in services/src/main/java/org/fao/geonet/api/groups/GroupsApi.java around the group-deletion indexing logic, then trace the `_groupPublished` field and its uses in search-nojs.xsl and csw-virtual.html. Verify how group identifiers and names are written to Lucene and how metadata reindexing is triggered. Done means renamed groups continue to work in facet filters and the listed consumers use the corrected field.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.