INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: MrC on January 19, 2013, 07:51:25 pm
-
I've (finally) completed and posted my rewrite of the Search Rules and Modifiers wiki page:
http://wiki.jriver.com/index.php/Smartlist_and_Search_-_Rules_and_Modifiers (http://wiki.jriver.com/index.php/Smartlist_and_Search_-_Rules_and_Modifiers)
Feedback and corrections encouraged.
-
Thanks! Great work, as always!
How about saying something about searching for empty and 0 values?
I seem to remember having some issues with entering decimal values in a search on my locale which is using comma as the decimal point. Could have been with date fields.
I take it you are waiting for some bug fixes before entering a main item explaining the range (-) operator.
-
Great points. I'll update to explain each of them. Thanks!
-
That looks good, my compliments!
Curious, I tried to replicate your example with "[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"", but it returned all three artists, I expected it to not return anything.
Are you sure that passage is correct or still applies to the current version? Or maybe I'm being thick again :P
-
Yes, I see the same ([Artist]=[Queen] [Artist]=[Heart] [Artist]="Grateful Dead" returning all songs by those artists). But [Artist]=[Queen],[Bob Dylan] [Artist]=[Heart] [Artist]="Grateful Dead" returns nothing.
-
That looks good, my compliments!
Curious, I tried to replicate your example with "[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"", but it returned all three artists, I expected it to not return anything.
Are you sure that passage is correct or still applies to the current version? Or maybe I'm being thick again :P
Thanks.
I'm not sure I follow you regarding expect this to return nothing.
When entered as Search Text, both the more liberal:
[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"
and the more formal and correct:
([Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead")
produces tracks from all three artists. These are OR operations, so should produce all tracks from any of the three.
If you now hit the Wizard, then the first will get incorrectly translated into AND operations, and you will get nothing returned. The later will work correct.
-
... But [Artist]=[Queen],[Bob Dylan] [Artist]=[Heart] [Artist]="Grateful Dead" returns nothing.
As written, these are AND operations, so would produce nothing. You'd want:
[Artist]=[Queen],[Bob Dylan] or [Artist]=[Heart] or [Artist]="Grateful Dead"
-
I am not sure I understand. This entered in the search field or import/export dialog returns songs from all named artists (not nothing):
[Artist]=[Queen] [Artist]=[Heart] [Artist]="Grateful Dead"
This, on the other hand, entered the same ways returns nothing (as expected):
[Artist]=[Queen],[Bob Dylan] [Artist]=[Heart] [Artist]="Grateful Dead"
-
I am not sure I understand. This entered in the search field or import/export dialog returns songs from all named artists (not nothing):
[Artist]=[Queen] [Artist]=[Heart] [Artist]="Grateful Dead"
I see exactly the opposite.
Maybe we're talking about different places for the text entry. In the upper right Search box, there are two modes: Text and Wizard. If you copy/paste your expression above into that box directly, you should see no results. I also get no results when pasting exactly that in Import/Export.
Your results don't make sense to me, because the default mode of combining search terms is AND. You're saying you see results as if OR operations are being defined.
-
Thanks.
I'm not sure I follow you regarding expect this to return nothing.
When entered as Search Text, both the more liberal:
[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"
and the more formal and correct:
([Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead")
produces tracks from all three artists. These are OR operations, so should produce all tracks from any of the three.
If you now hit the Wizard, then the first will get incorrectly translated into AND operations, and you will get nothing returned. The later will work correct.
Because you wrote (I added emphasis :P) so I didn't expect it to work:
For example, the loosely written three-term search query using the or operator
[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"
will be incorrectly translated by Search Wizard into a three-term and operation
[Artist]=[Queen] [Artist]=[Heart] [Artist]="Grateful Dead"
This is not happening, and the query just works.
-
Ah I think I see what you mean. In the screenshot you can see the wizard turns it into "is any", but when you run it it retuns nothing. It doesn't import the brackets for 'or'.
-
Maybe we're encountering a wrinkle or difference due to different language settings?
Its like both InflatableMouse and vagskal's searches are defaulting to using OR operations instead of AND.
See the attached screenshot. I paste into the Text area exactly:
[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"
and all three artist's tracks are returned. Then I hit Wizard with that text applied (shown in screenshot), and you can see the results are now AND operations (note that there are no parens included). When I hit Apply, all tracks disappear.
-
Ah I think I see what you mean. In the screenshot you can see the wizard turns it into "is any", but when you run it it retuns nothing. It doesn't import the brackets for 'or'.
Bingo. And that would be the flaw in Text --> Wizard translation I documented.
-
It occurs to me also that I should make clearer the concept of AND and OR, as ordinary language confounds these mathematical terms.
In ordinary language, one could read Artist=Queen and Artist=Heart to mean, "Yes, I want Queen and I want Heart". But it really means "Artist must be Queen AND Artist must be Heart", at the same time, an impossibility.
-
Oke I'll confess something ... I try to use the wizard as little as possible because I don't like it.
So the first time I checked the search example you gave, I entered the text into the wizard but never applied it, I cancelled the wizard when I saw it translated to 'is any' and incorrectly assumed 'or'. I still can't get used to how 'and' and 'or' works there. I think its one of the most unintuitive and even counter-productive parts of MC.
-
Good that we got to the bottom of this. Thanks.
The unintuitive part being the hidden parens? I agree. This would be much clearer with something that indicates you can click there, minimally. There are better interfaces to show AND/OR relationships across a series of clauses.
As an aside, the "is any" applies to a list, meaning is the term in any of the list items.
-
I've updated the page.
vagskal - if you have more info, prose, or examples on locale issues and search, I'd appreciate some.
Added:
- Added Search and Locale section
- Clarify empty and 0 values
- Indicate how to search for empty values
- Clarify AND and OR: mathematical vs. common language usage
- Fixed fonts in Examples, and Limitations and Bugs sections.
- Added a few more items to Limitations and Bugs section
-
I will look closer at this tomorrow and response. It is late now in my time zone, and I have been busy with other stuff.
Great job with the wiki page, MrC!
-
Its like both InflatableMouse and vagskal's searches are defaulting to using OR operations instead of AND.
See the attached screenshot. I paste into the Text area exactly:
[Artist]=[Queen] or [Artist]=[Heart] or [Artist]="Grateful Dead"
and all three artist's tracks are returned. Then I hit Wizard with that text applied (shown in screenshot), and you can see the results are now AND operations (note that there are no parens included). When I hit Apply, all tracks disappear.
OK, I see the same as you and like InflatableMouse I did not Apply the resultant search I had not altered. Sorry.
-
I'd say something along the lines of 'great minds think alike', but I don't think it would be appropriate in this situation. ;D
-
vagskal - if you have more info, prose, or examples on locale issues and search, I'd appreciate some.
For me on Swedish locale searching date fields (Date, Last Played etc) is not working properly.
Searching with y and d values works (like [Date]=<5y). For decimal values (like [Last Played]=<0.5d) I have to use dot instead of comma according to the locale.
Anything requiring a full or partial date is not working on date fields with iso dates (yyyy-mm-dd). Entering a full date in this format (which is not correct according to Swedish locale) mm/dd/yyyy works.
Entering just the year as it is displayed in the date field ([Date]=2012) is not working. Entering [Date]=01/01/2012 works.
____
Using d, y etc after a zero is not working: [Last Played]=0-0.5d works (and returns songs never played or played in the last 12 hours) but [Last Played]=0d-0.5d returns nothing.
Edit: And when you come to the range operator you might want to say something about escaping - in searches ([Date Born]=[1867/-04/-12]).