Hi!
Is it possible to search topics with several tags simultaniously? e.g. Find all topics tagged with "Feedback" and "Features"
Multi-tag search
Since "Features" is a sub-tag of "Feedback", merely viewing the Features tag will show topics tagged with both. If you're after an OR search (ie, show topics tagged with [Feedback + Features] OR [Feedback]), you can use the tag:
gambit with a comma-separated list of tags:
https://discuss.flarum.org/?q=tag%3Afeedback%2Cfeatures
To do an AND search, just use the tag:
gambit twice:
https://discuss.flarum.org/?q=tag%3Asupport%20tag%3Asolved
We'll aim to have some GUI for this in the future.
- Edited
Just wanted to bump this. Is this possible in the UI now?
For example searching by multiple sub tags?
truecrisis Cathas9lives Toby's answer above explains how to do it. There's no UI for an advanced search yet so you need to type the gambits manually in the search field.
Is there a way to use the gambits to exclude tags from the result?
Give me discussions tagged with tag A that do not also have tag B
Thanks!
Also, for people using Flarum in other languages, can the gambits be extended to use translations?
I think tag:
should always work, regardless of language, but it would be nice to support the translations when using a language pack.
-tag:
seems to work. That is awesome. Thanks for all the help you have been providing recently. For a new admin like me, it makes a BIG difference.
- Edited
While an "Advanced Search" UI would be great, I think it could be useful for both usability and discoverability of this filtering feature to prefill the searchbar with the corresponding tag:*
text when a tag is selected. To make the search filters match the current view.
This would allow to qucickly search in a tag, without knowing the syntx and th tag's slug. And I think it easy to understand that one need to remove it to search the entire forum. This is what GitHub does for example and I find it quite pleasant to work with.
It wonder if it would be possible for the flarum-tags
extension to implement this with the current APIs?