[X] Filter Failure of <string> OR <string>

1 Load some tracks not having xxxxxx or yyyyyy in any field
2 In Filter: enter:

xxxxxx OR yyyyyy

Expected: no tracks shown, in accord with docs http://img838.imageshack.us/img838/5070/mp...lteringfile.png
Observed: all tracks shown

With OR removed, results are as expected - no matches.

Workaround: recode as:

  • HAS xxxxxx OR * HAS yyyyyy

My thanks to JJ Johnson for help on this.

If anyone can tell me the most recent version of the program in which this bug is absent and OR works properly, please do. Thanks.

The "docs" also talk about an "expression" but a plain xxxx and a plain yyyy are no expressions. They are results. And they are results that do not equla zero (0).

As the whole thing is a logical operation with OR it means that anything unequal 0 (zero) is true.
So, as xxxx is not 0 and yyyy is not 0 the whole term becomes true and displays all tracks.

(you can try this with the calculator that comes with Windows, set it to scientific, enter 1 OR 1 = and see that it is 1. 0 OR 0 becomes 0, 1 OR 1 becomes 1).

Evidence, please.

Have a look at the help on Filters: "Filter expressions consist of a field, a keyword and a string for comparison" (my translation ... you will find it, I think).
On boolean operations have a look at
the section on basic operations.

Have done, thanks.

If that were so, then 0 OR 0 would display no tracks. It doesn't. In my tests, it displays all.

And NOT xxxxxx OR yyyyyy would display no tracks. It doesn't. In my tests, it displays all.

What are you trying to proove? THat you still do not use the filter function in the described fashion?
0 is no expression
xxxxx is no expression
yyyyy is no expression

Just a quick edit: "0 OR 0" is still true as the filter expects a string input. And the character "0" has the ASCII code 48 (I think) - so it does not equal zero and the result is computed from a TRUE OR TRUE calculation - and shows all files just as you found out.

Any other string (like any xxxxx or yyyyy) does also not equal zero but has a value well above zero.
So in logical terms
NOT xxxxxx OR yyyyyy
translates to
which means "show all tracks that are true or not true" which I think is a longish way of saying "all" - just as you found out.

The only way way to get a binary zero into the filter field is by using an expression as described in online help.
It is a nice side-effekt that a single word acts like the filter operator "HAS". See this a feature but don't see the other behaviour as a bug. As soon as you want to have anything more elaborate than just this fixed string, you have to use the filter expressions.

If that's the design intent, then I think the documentation needs clarifying. Currently it shows as the first item in the Description of the Filter Expression Language, which is most misleading if is not intended to be a filter expression.

Thanks for your help, ohrenkino .

You have to read what it really says:
: simple filter. Shows only the files that contain all the words of the string.
And that is exactly what is does.

As soon as you try to apply something more complicated the help does not suggest anywhere that
x OR y
is a valid expression but states clearly:

So, I think the whole discussion originates in some kind of misconception or misunderstanding and can now be faded out.
You have used the filter in a way it was not intended or described, you did not get the results you wanted (not suprisingly) - so what?
It is no bug. Not in the function, not in the description.

I don't see that in the documentation for this feature http://help.mp3tag.de/main_filter.html .

Where did you take it from?

I see it in the paragraph with the headline "Description of the Filter Expression Language"


Returns only files that contain every word in the string as a word or substring thereof. A word is a contiguous sequence of characters excluding the space character.
(it goes on)

Combines the filter expressions and by logical and or or. Parentheses can be used to group combined expressions. "

Yes, to be honest: what I wrote was my futile attempt to translate it on-the-fly from the German version ... so the words are not quite the same.

I don't. That paragraph mentions substrings, whereas yours did not.

Thanks for the correction.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.