Skip to content

Possibility to search system tags with a better query system #4851

Description

@Spartachetto

It would be really useful to have the possibility to search not only for tag A AND tag B but also for tag A AND NOT tag B, or tag A OR tag B

I would value especially tag A AND NOT tag B.
Some use cases:

  • All the documents about client X and not about contracts
  • All the photos about family and not about private

I was thinking that even a"simple" change in the interface would be a big improvement.
andnot

My hypothesis of how to make it work would be:

  • automatic focus on "Select tags to filter by" as now
  • start to search when the first tag in "... filter by" field is selected
  • allow to fill "... to exclude" even if "... filter by" is empty, yet do NOT start to search if "... filter by" is empty

This feature should take into account #2143, which is already part of #4699 and scheduled for Nextcloud 13

Activity

  1. MorrisJobke commented on May 14, 2017

    @MorrisJobke
    Member

    cc @nextcloud/designers

  2. jancborchardt commented on May 15, 2017

    @jancborchardt
    Member

    A first change here could be a syntax like:

    labelname not:label-to-exclude

    Similar to how other search services do it.

  3. Spartachetto commented on May 18, 2017

    @Spartachetto
    Author

    If you choose to use syntax, you could also provide something a bit more powerful/complex with parentheses and OR operator.
    Maybe the best solution could be an "easy" interface with limited functionality plus possibility to use syntax to have more power.

  4. MariusBluem commented on May 18, 2017

    @MariusBluem
    Member

    Have a look how GitHub's Issue Tracker does.

    • visual filter in "Tags"-menu, which will apply as syntax in the search bar.
    • syntax in search bar
  5. compumatter commented on Sep 6, 2017

    @compumatter

    I am running into a problem that may highlight a "use case" for you here: https://help.nextcloud.com/t/limit-tags-scope-for-shared-folders/20560

  6. removed
    staleTicket or PR with no recent activity
    on Jun 12, 2019
  7. skjnldsv commented on Aug 20, 2020

    @skjnldsv
    Member

    Do we want tags in unified search @jancborchardt ?

  8. Spartachetto commented on Aug 26, 2020

    @Spartachetto
    Author

    Pretty please!

    On a more serious tone: the unified search seems a really interesting development.

    I do understand the idea that a lot of users do not use tags, yet I think that if Nextcloud offer that functionality it should offer also (as far as possible) tools to use it properly.

    As you are redefining search and vastly improving it, my impression is that not including tags in it would be a missed opportunity.

    Thank you for al the improvements you are developing!

  9. skjnldsv commented on Aug 27, 2020

    @skjnldsv
    Member

    Thank you for al the improvements you are developing!

    Thanks :)
    The issue with tags is that listing all direct tagged ressources isn't really that great on Nextcloud (the files tag view is awful)

    So I would be up for this once we have a proper tags view 🤔

  10. Spartachetto commented on Aug 29, 2020

    @Spartachetto
    Author

    Clearly better tags view + better search tools for tags would be terrific!!!

    Is there any issue for the better tags view?
    I do not remember seeing it, yet if it exists it could be helpful to link it here...
    Maybe #2143 could be the right issue...

  11. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Nov 8, 2020
  12. arrowd commented on Nov 24, 2020

    @arrowd

    One feature that probably should be easy to implement is to allow searching for tags by any part of the string, not only the beginning.

    In my instance, I have a lot of tags like from:foo, from:baz, etc. Typing foo when adding a tag results in 0 matches, so I have to type from:, which results in a lot of irrelevant tags.

  13. sp33dsk8 commented on Feb 12, 2021

    @sp33dsk8
  14. stefan-niedermann commented on Feb 12, 2021

    @stefan-niedermann
  15. KernSani commented on Oct 24, 2024

    @KernSani

    Would like to bring up this topic again. In general tags are really powerful, however how they are currently implemented for files, they are pretty useless (Nextcloud 30.0.1):

    • Unified search doesn't support searching for multiple tags (search syntax would probably have to be enhanced for that, ideally with boolean operators
    • In the files application only a single tag can be selected (so a tag is similar to a folder) - would suggest a filter possibility (like we have it for document types, but with checkboxes to have the possibility to select multiple tags). E.g. the deck app has such a filter
  16. FelixKainz commented on Nov 7, 2024

    @FelixKainz

    In general tags are really powerful, however how they are currently implemented for files, they are pretty useless

    Yes, please! Tags can be soo powerful. I cannot live without them.
    The poor tagging search is my biggest issue with Nextcloud :/

  17. mschxyz commented on Jan 9, 2025

    @mschxyz

    In the files application only a single tag can be selected (so a tag is similar to a folder)

    In the older versions of the files app it was possible to search for multiple tags, which was an amazing feature.
    I'm not entirely sure why it's not possible anymore and how difficult it would be to bring it back.

    As an example: We organize quite a few files concerning public events (think something like concerts).
    When looking for the print files of posters from all events in 2024, I'd just type print, poster and 2024.

    Now I can only search for a single tag.
    So looking for print will give me everything we ever printed, poster will give me every poster from every event and 2024 will give me everything from the year 2024, including contracts, photos and whatnot.

  18. support-econocom-lu commented on Sep 8, 2025

    @support-econocom-lu

    Hello,

    I would like to bring this up too.
    We have several project where we wanted to use tags to classify documents.

    We can't use tags as expected as there is no way to search for multiple tags.
    For instance, If we want to find all documents owned by IT regarding HPe servers, we should search for tag IT and HPe and Servers.

    In the current state, we can only search for IT or for HPe or for Server tag, so it's unfortunately pretty useless to us.

    Regards,

  19. Io-Qo commented on Oct 27, 2025

    @Io-Qo

    I would also underline that this has existed in the past and within my organisation we built our file structure around the possibility to search for multiple tags. Then this has - without any warning - been removed and literally people had to manually sort thousands of files back into separate folders to make them findable again. Making this change was rather careless in my opinion so I would also beg the developers to bring it back and make sure it stays.

    I want to summarise the advantages:

    • being able to virtually sort files into multiple "folders" with tags when you can't actually sort one file into multiple folders without creating copies
    • assigning tags with flow can be automated (!)
    • file retention is based on tags
    • files access control is based on tags

    So many of Nextcloud's inherent features evolve around tags, searching for tag combinations seems only natural and also shouldn't really be a big hurdle to implement.

  20. fschiefenhoevel commented on Jan 14, 2026

    @fschiefenhoevel

    +1 from me for the re-introduction of the capability to search for multiple tags!

  21. CodePeasants commented on Sep 9, 2026

    @CodePeasants

    +1 this feature would be very useful to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions