Skip to content

Support multiple tags filtering (early draft)#8429

Draft
Kdecherf wants to merge 2 commits intomasterfrom
feat/tags-filter
Draft

Support multiple tags filtering (early draft)#8429
Kdecherf wants to merge 2 commits intomasterfrom
feat/tags-filter

Conversation

@Kdecherf
Copy link
Member

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass?
Documentation
Translation yes
CHANGELOG.md
License MIT

⚠️ IMPORTANT Right now this is an early stage work, the query builder logic does not scale and needs performance improvement

Fixes #2633
Fixes #1197

This PR adds a new field in the filters modal to filter entries by tags.

The available operators are:

  • Match a given tag (exact match), e.g. software (referred to inclusion condition below)
  • Not match a given tag by prepending the minus sign to the tag name (exact match), e.g. -software (referred to exclusion condition below)
  • Limited pattern matching using '%', for example topic:% would match entries having either topic:software or topic:hardware, whereas -science:%' would exclude entries having either science:healthorscience:space`

You can add several conditions by using a comma, for example: software,-hardware.

The final expression can be summarized as: "(match ANY inclusion condition) AND (do not match ALL exclusion conditions)"
This means that the expression software,hardware would return all articles having either the software or the hardware tag.

Reference: #1197 (comment)

Fixes #2633

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filters on tag view Multiple tags filtering

2 participants