geosolutions-it/nexus-geonode

Lots of keywords disconnected from resources

Opened this issue · 1 comments

The keywords filter returns a long list of keywords with 0 resources connected.

  1. keywords without resources shouldn't be returned by the keywords endpoint
  2. apparently keywords are never removed when the last resource connected to the keywords isn't removed. Maybe this has always been like this since keywords can be a set controlled by admins. I just want to clarify if this is expected or not.

@giohappy i i don't see us managing the removal of keywords manually on deleting resources.

The keywords api is also used on the metadata form when users are assigning/updating keywords.
If we make the api consider only ones with atleast one resource connected, does it mean we will need to have a migration to delete ones without resources since they will not be used anywhere?