I have been using the app filters option to remove some posts I don't care about that are recurring, which is a nice feature.
There are however two problems with it that are sort of related, I don't seem to get it to work filtering combinations of words? E.g. I can filter for "hello" and "world" but when I make a filter for "hello world" it doesn't block anything. Is there a certain way you need to define those or does it just not work?
And since I can only do single word filters I have now the issue that I filter posts I do not mind actually. E.g. by trying to filter "hello world" with just "hello" I am also filtering "hello you". But whenever a post got filtered it does not tell you which filter was applied, it just says "this post is filtered because of a custom filter", or something like that.
Could that message maybe write out the word it filtered so one can see which filter got applied? Since I had wrong posts filtered I am now often checking, which post is behind the filter, but thats kind of removing the purpose of the filter.
I just tested this. I created a post with the title "some other post". Then I filtered by "other post" and the post was filtered. Do you have a more concrete example?
I also tried your exact example. I made a post "Hello world", filtered by "hello world" and it got filtered.
You can try it yourself here: https://lemmy.world/c/summittestcommunity
Thanks, I had a look and it is really inconsistent for me how the filters work. How do they kick in when I add a new one, do I just need to swipe/reload and it should work? Doesn't seem to work for me.
So I made one for "test post" and you are right, they got filtered perfectly. Then I thought the phrases I wanted to filter include brackets and percentages, maybe there is a bug with that? Made a test post myself then, which got for some reason immediately filtered even though it did not match any filter I had still. So I unhid it, tried filtering for part of its title but I cannot get it filtered. Is it because it was filtered before and I undid that?
I figured out the cause. It's because of the setting "match whole word". Because brackets are considered a "word boundary" they cannot be within the match itself.
Think of it like this: when match whole word is on, it will only start checking if something matches after it encounters a word.
So let's say you have the text "[brackets] are cool" and you are looking for "[brackets]" then the search only starts when it sees the "b" so it tries to match "brackets" to "[brackets]" which is obviously not equal so it will fail the match.
The fix is to turn off "match whole word". That setting should only be on for filters that contain a single word. I could look into adding a warning for cases like this.
Woah, interesting, I will try this out. Thanks for looking into it and giving a detailed explanation!