-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Add exclusive And/Or search options #314
Comments
This is related to #112 (as a part of larger discussion about search queries) Exclusive OR is commonly written as XOR: https://en.wikipedia.org/wiki/Exclusive_or Truth tables:
|
@KillyMXI, I don't believe that @coolesding was referring to exclusive OR the boolean operation. As I understand it, Coolesding was hoping to exclude entries from their searches without explicitly typing out the tags they want to exclude. As I understand it, the premise is that if the only tags Coolesding explicitly types out are Personally, I strongly believe that Coolesding should be able to make the library work that way, but I really dislike the idea of adding features that only work if you only have a single category of tags. Coolesding ought to be able to use non-character tags without breaking the search. For example, if Coolesding adds a "text" tag to some of the entries, then there will be no way to include both entries with text and entries without text in an "Ex. And" search. What I would suggest is the solution is adding tags to each file for the number of characters. Eg. Does anyone else have any thoughts on this issue? |
Right, I misinterpreted the issue text because I had strong and different interpretation of those terms in my head. What booru-like systems such as Hydrus can offer to allow a search query like this:
Number of tags within a certain namespace is tricky though. If we ignore the possibility of other tags, examples from OP can potentially look like this:
But that's not a very practical assumption - it's natural to expect more tags besides characters. Limiting the number of tags within a namespace or wildcard can be an interesting design challenge. |
That's really interesting @KillyMXI. CyanVoxel actuallly has tag categories as a planned feature: https://github.com/TagStudioDev/TagStudio/blob/main/doc/library/tag_categories.md I don't know how namespaces work in Hydrus, but the concept of tag categories may be similar. Also, your first example of |
Dang, I goofed twice in one thread... So, within the same constraints, the first example can be fixed like this: I think this creates a stronger case for Set Theory. The OP examples can be formulated as following: This can then be improved by limiting to character tags: To make this possible, few features needed:
What syntax can look like:
Our examples may look like this: And I overlooked one more thing:
But this will be a common inconvenience. Definitions of proper (strict) subset/superset does not fit this issue exactly - they work at the wrong end of it. What is needed are variations on subset/superset operator:
Asked ChatGPT whether there is a common notation for this, there seems to be none, and ChatGPT suggests introducing custom notation, so:
This is probably most unambiguous way to introduce the non-emptiness clause at the right place. Not really considering Attaching non-emptiness condition to queried set rather than operator will create different problems, it doesn't have good behavior there. I can't comment on Tag Categories. One sentence description gives me no understanding, without also being an active user of TagStudio currently. |
Checklist
Description
Currently, the search can only be set to either And (Includes all Tags) and Or (Includes any Tag). I just had the problem of trying to find an image that has two tags, but no others, which seemingly I have to do manually searching for all the tags I want and filtering the ones I don't want myself.
Solution
I think adding the options
Ex. Or (Exclusively includes any Tags)
Ex. And (Exclusively includes all Tags)
would be great additions to the versatility of Tagstudio!
EXAMPLE
I have a database of many images from and about the bocchi the rock anime, which among others includes the tags:
Kita
Bocchi
Nijika
Ryou
There are all combinations of images tagged, some with only one, some with multiple, some with all characters tagged.
Searching for "Kita, Bocchi" in Exclusive Or mode would result in all images that only have the kita tag, only have the bocchi tag or only have the bocchi and kita tags, and no others.
Searching for "Nijika, Ryou" in Exclusive And mode would result in all images that only have the Nijika and the Ryou tags, and no others.
Alternatives
The naming "Ex. Or" and "Ex. And" could probably be improved, but I can't think of a better solution currently (In my defense, i am writing this at 1 in the morning after having a horrible sleep)
The text was updated successfully, but these errors were encountered: