Filtering articles

Purpose

When the number of articles stored by FreshRSS inevitably grows larger, it’s important to use efficient filters to display only a subset of the articles. There are several methods that filter with different criteria. Usually those methods can be combined.

By category

This is the easiest method. You only need to click on the category title in the side panel. There are two special categories at the top of the panel:

By feed

There are several methods to filter articles by feed:

Feed filter

By status

Each article has two attributes that can be combined. The first attribute indicates whether or not the article has been read. The second attribute indicates if the article was marked as favorite or not.

In version 0.7, attribute filters are available in the article display dropdown list. With this version, it’s not possible to combine filters. For instance, it’s not possible to display only read and favorite articles.

Attribute filters in 0.7

Starting with version 0.8, all attribute filters are visible as toggle icons. They can be combined. As any combination is possible, some have the same result. For instance, the result for all filters selected is the same as no filter selected.

Attribute filters in 0.8

By default, this filter displays only unread articles

By content

It is possible to filter articles by their content by inputting a string in the search field.

With the search field

You can use the search field to further refine results:

Be careful not to enter a space between the operator and the search value.

Some operators can be used negatively, to exclude articles, with the same syntax as above, but prefixed by a ! or -: !f:234, -author:name, -intitle:keyword, -inurl:keyword, -#tag, !keyword, !date:2019, !date:P1W, !pubdate:P3d/.

It is also possible to combine keywords to create a more precise filter. For example, you can enter multiple instances of f:, author:, intitle:, inurl:, #, and free-text.

Combining several search criteria implies a logical and, but the keyword ` OR ` can be used to combine several search criteria with a logical or instead: author:Dupont OR author:Dupond

You don’t have to do anything special to combine multiple negative operators. Writing !intitle:'thing1' !intitle:'thing2' implies AND, see above. For more pointers on how AND and OR interact with negation, see this GitHub comment. Additional reading: De Morgan’s laws.

ℹ️ Searches are applied to the HTML content, and special XML characters <&"> are automatically encoded (so one can search for 'A & B' without having to encode the &amp;). To search HTML tags, one must use regex searches (see below).

Finally, parentheses may be used to express more complex queries, with basic negation support:

ℹ️ If you need to search for a parenthesis, it needs to be escaped like \( or \)

Regex

Text searches (including author:, intitle:, inurl:, #) may use regular expressions, which must be enclosed in / /.

Regex searches are case-sensitive by default, but can be made case-insensitive with the i modifier like: /Alice/i

Supports multiline mode with m modifier, like: /^Alice/m

ℹ️ author: is working with one author per line, so the multiline mode may advantageously be used, like: author:/^Alice Dupont$/im

ℹ️ # is likewise working with one tag per line, so the multiline mode may advantageously be used, like: #/^Hello World$/im

Example to search entries, which title starts with the Lol word, with any number of o: intitle:/^Lo+l/i

As opposed to normal searches, special XML characters <&"> are not escaped in regex searches, to allow searching HTML code, like: /Hello <span>world<\/span>/

ℹ️ A literal slash needs to be escaped, like \/

⚠️ Advanced regex syntax details depend on the regex engine used:

By sorting by date

You can change the sort order by clicking the toggle button available in the header.

Bookmark the current query

Once you came up with your perfect filter, it would be a shame if you had to recreate it every time you need to use it.

Luckily, there is a way to bookmark them for later use. We call them user queries. You can create as many as you want, the only limit is how they will be displayed on your screen.

Read more about user queries to learn how to create them, use them, and even reshare them via HTML / RSS / OPML.


Read more: