Filter by mutliple labels

I have a lot of various labels.
In most cases single label is okay. But in some cases it’s necessary to filter articles by several labels.
Most of labels are applied by (OR) filters. So required combination should looks like (X OR Y) AND (A OR B).

Right now ttrss have Labels view, which filters by single label. Maybe there is a way how to filter by several?

it should be possible to add searching by label (syntax being something like label:Blah), this way you would be able to combine search keywords however you like.

Searching by labels sounds good. Simple AND is enough for most cases.
Best case if possible to use NOT, OR and grouping ‘( )’ -

https://git.tt-rss.org/fox/tt-rss/commit/44b1f0fcc0a0497b8fa0895b8655f4f1b9396ace

this adds support for label: search keyword.

note that i’m fairly certain that this is a rather inefficient way to write this particular SQL request, unfortunately i didn’t figure out a better way to do it. it seems to work well enough for me though but may lag if there’s a lot of articles assigned to a particular label.

ideas welcome, etc.

unless someone wants to rewrite search parser to support groups, i’m afraid this unlikely. you should be able to do the not/and the usual way as described in the search syntax wiki - i.e. “a b c” is a and b and c; “a -b” is a not b etc

stuff like label:git -label:debian works for me

For some reason doesn’t work for me. Any way to debug?
Updated from git, in UI I have

Tiny Tiny RSS v20.04-44b1f0fcc © 2005-2020 Andrew Dolgov

From “All articles” I use “Menu → Search”, put in the textbox: “label:mylabelname” (Language: Simple) and get nothing (No unread articles found to display).

I have missed something?

UPDATE:
It’s likely my fault. At some point I disabled external updates in favour of built-in tt-rss updater. I had sphinx reindex in same systemd unit. So, once disabled, sphinx was never updated.

UPDATE:
After sphinx reindex I was able to search by one label. But query like “label:mylabel1 label:mylabel2” returns with no results.

UPDATE:
I disable sphinx plugin. After that search by multiple labels works. So, such kind of search will not be possible with sphinx?

yeah search query stuff is incompatible with sphinx, sphinx takes over search function entirely.

i think this is documented on the wiki, if not it should be.

e: you could probably add labels to sphinx index somehow

Thank you @fox for this awesome fix! I anticipated this feature for a long time.
BTW is there any way to save a filtered search results as a new category or something similar?

i’ve also immediately thought about it but it seems like a lot of annoying UI to implement, maybe a plugin could handle this instead.

e: i’ve also thought about making search text box a dropdown with latest searches.

alternatively, as a pretty terrible workaround, you can always subscribe to the RSS feed of the search.

Is there a javascript link he could bookmark? I bookmarked a label filter. E.g.

javascript:(Feeds.open({feed:'labelNameHere'}))

something like that could work, but uglier: you will need to set Feeds._search_query first.

there’s also Feeds.search() but it invokes search dialog. i think it would be a good idea to add an ability to pass search query directly to Feeds.open() and maybe rename Feeds.search to Feeds.searchDialog or something.

e: it would be nice to have this in the hash parameters but i’m not sure how annoying this would be to implement, something like #f=4&q=blahblah this would make bookmarking it very easy.