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.
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
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?
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?
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.