Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
https://lrr.tvc-16.science
MIT License
2.24k stars 159 forks source link

Add ability to use logical OR in searches and category predicates #754

Open jf8497 opened 1 year ago

jf8497 commented 1 year ago

Please describe your suggestion, and the problem it'd solve. I would really appreciate support for logical OR operations in searches. This would be particularly useful when creating dynamic categories. For example, I'd like to have categories of favorite artists or tags that I could filter the library by, each with maybe dozens of entries.

Difegue commented 1 year ago

This is doable but firmly a mid-size job to figure out a good syntax - The current search syntax just assumes AND by default and makes a few shortcuts due to that.

Since we're comma-delimited now, I guess you could write it tag:a || tag:b, tag:not_in_or to keep things simpler. Although there's still multi-level OR operations to handle, alongside being able to escape that || for the unhinged edge-case where someone has that in a title..

USBhost commented 1 year ago

sankaku complex uses ~ as it's or. So any ~ or in this case tag:~b sankaku's logic is that one of the provided ~ must match. so you could used ~1girl ~1boy and it'll give you both or ether or.