Author Topic: A revamp of the search tool?  (Read 16331 times)

tom_dl

  • Guest
I may be wrong here, but I think in programming, AND means BOTH x AND y, whereas OR means I'm searching for x and i'm searching for y, so want the equivalent of doing two searches and combining the results. When I studied logic years ago, this was known as the "inclusive OR", whereas, we normally use it exclusively in everyday speech (like I want sandwiches OR icecream (but not both!)).

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
Did some tests: If i search for "artist:john" i get 86 results, and if i search for "artist:john + year:1990" i get the same results. If i search for year:1990 i get 45 results, most of them not shown in the second search.

In logic theory if we apply the search "artist:john + year:1990" and have a track tagged with artist john (first term is truth) and year...:
-is 1993 (second term is false) for AND it would be 1*0=0, while for OR would be 1+0=1
-is 1990 (second term is true) for AND would be 1*1=1, while for OR would be 1+1=1 (yep 1)

So now the OR function is showing all entries which are true at the first term, and the second term hasn't any effect in the results, maybe there is a bug and the second term it's being tested for the results of the first term instead of to the original group.

By other side the interesting thing would be using the search box as a replacement of the track browser, but now "artist:john * year:1990" or the more friendship search "artist:john AND year:1990" shows no results
Last Edit: January 21, 2013, 10:46:28 AM by lnminente

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
I want sandwiches OR icecream (but not both!)).
That would be XOR. I'm not sure how useful it would be when applied to searching a music collection.

So now the OR function is showing all entries which are true at the first term, and the second term hasn't any effect in the results...
That's what I'm finding too - the second term isn't being applied correctly.
Bee excellent to each other...

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34359
i have improved the handling for multiple fields eg. artist:john + year:1990
however it is cheating in that what it actually does is restricts the search to the 2 fields but matches either value, so if your year tag had 'john' in it then it would match.
I dont plan to spend further time on it though and i think that should be good enough

http://musicbee.niblseed.com/V2_1/MusicBee_Exe_Patched.zip
Last Edit: January 21, 2013, 09:01:59 PM by Steven