npolar / api.npolar.no

Searchable data storage
https://api.npolar.no
4 stars 0 forks source link

Enhancement request: Auto-tag entries with parent category if necessary #31

Closed paulflakstad closed 7 years ago

paulflakstad commented 9 years ago

Users will often tag an entry with only the most relevant tag. This tag is sometimes a "child" tag (e.g. ICE Fluxes), and this will result in a missing "parent" tag (e.g. ICE).

The result is somewhat counter-intuitive filtering options; a filter for a parent tag may produce far less hits than its child filter. Real-world example: ICE Fluxes -> 50 hits ICE -> 5 hits

Proposed solution: Automagically apply the parent tag (before saving) whenever a user has applied a child tag only.

The issue has been identified for ICE and its sub-programmes (e.g. ICE Fluxes), and some area tags, like areas contained within the Arctic. (E.g. entries may be tagged only "Svalbard", not "The Arctic".)

Example 1: http://www.npolar.no/en/publications/ (see "Programme" filters) Example 2: http://www.npolar.no/en/projects/ (see "Area" filters)

cnrdh commented 9 years ago

Unfortunately there is no easy way to identify parent/child relations, so we need to push rules in the before_save model hook