-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
needs - additional infoNeeds more information from the reporterNeeds more information from the reporter
Description
What feature or improvement do you think would benefit Files?
Feature: Enhanced Tag Search with Logical OR Operator
The current tag search functionality is powerful for finding items that match all of a set of tags (logical AND, e.g., tag:Important,ProjectX
). This proposal is to add support for a logical OR operator, allowing users to find items that match any of a set of tags (e.g., tag:Important|Urgent
). This brings greater flexibility and power to the file organization system, enabling users to perform broader, more inclusive searches with a single query.
Use Case:
- A user has tags for "Family", "Vacation", and "2024". They want to quickly see all photos that are either "Family" or "Vacation" related, regardless of the year. Currently, this requires two separate searches. With an OR operator, they could simply search for
tag:Family|Vacation
. - A project manager uses tags like "Pending", "In-Review", and "Blocked". To get an overview of all active but not-completed tasks, they could search for
tag:Pending|In-Review|Blocked
in one go.
Requirements
To implement this improvement, the following changes are required:
- Define OR Syntax: Introduce a new symbol (e.g., the pipe
|
) to serve as the logical OR operator between tag names within thetag:
search filter. - Update Search Parser Logic: Modify the search query processing engine to correctly interpret the new OR syntax. The search logic should be updated to return items that match any of the tags specified between the
|
symbols. - Maintain AND Backwards Compatibility: Ensure the existing comma (
,
) separator continues to function exclusively as a logical AND operator to maintain backward compatibility for all user-created saved searches and habits. - Handle Mixed Queries (Stretch Goal): Ideally, the system should support combinations of AND and OR within a single
tag:
query. This may require defining operator precedence or using parentheses (e.g.,tag:Important,ProjectA|ProjectB
to find items tagged "Important" that are also tagged with either "ProjectA" or "ProjectB"). - Update Documentation: The in-app tooltips and official documentation (like the help file provided) must be updated to clearly explain the new OR operator syntax and provide examples.
Files Version
4.0.11.0
Windows Version
10.0.19045.5608
Comments
- The current behavior of the comma (
,
) as an AND operator was confirmed through testing, as it is not explicitly detailed in the current documentation. - The pipe
|
symbol is a widely recognized convention for representing OR in technical search contexts (e.g., in regular expressions, many databases, and other file managers), making it an intuitive choice for users. - Implementing even the basic OR functionality (Requirement #1 and #2) would be a massive usability win. The mixed query support (Requirement #4) is a valuable but more complex secondary step.
- This enhancement would make the tagging system in Files exceptionally powerful and on par with professional-grade file management and productivity software.
Metadata
Metadata
Assignees
Labels
needs - additional infoNeeds more information from the reporterNeeds more information from the reporter