INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Search expands to include unmatched results  (Read 454 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3967
Search expands to include unmatched results
« on: August 05, 2018, 03:05:01 pm »

I executed the following search against my library

[Media Type]=[Audio] [Genre]=[Audiobook],[Childrens] -[Genre]=[] ~expand=[Album]

i.e. find all tracks in any album that contains a track with genre of audiobook or childrens

The results include the likes of Wu-Tang Clan and the Reservoir Dogs soundtrack and a bunch of stuff that has neither genre nor album tag set to any value.

Am I doing this wrong or is this feature not working so well?
Logged

swiv3d

  • Guest
Re: Search expands to include unmatched results
« Reply #1 on: August 05, 2018, 03:20:49 pm »

Take the square brackets from the last [Album] and it should work as expected.

[Media Type]=[Audio] [Genre]=[Audiobook],[Childrens] -[Genre]=[] ~expand=Album
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3967
Re: Search expands to include unmatched results
« Reply #2 on: August 05, 2018, 03:27:17 pm »

Thanks, I'll give that a try.

I'm struggling to see how [Album] is interpreted though, probably some validation of user input would be a good idea there.
Logged

swiv3d

  • Guest
Re: Search expands to include unmatched results
« Reply #3 on: August 05, 2018, 03:41:40 pm »

I think it is because [Album] refers to the field Album in the library whereas Album without the brackets is interpreted as a level to expand each selected item to. I may be wrong of course, I often am.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3967
Re: Search expands to include unmatched results
« Reply #4 on: August 05, 2018, 03:45:26 pm »

I think it is because [Album] refers to the field Album in the library whereas Album without the brackets is interpreted as a level to expand each selected item to. I may be wrong of course, I often am.
yes that is I was thinking too but then thought that means it will expand to the value in the Album for the matching tracks. This seems like a meaningless expand though (so I guess "behaviour is undefined" is not necessarily unexpected)
Logged

swiv3d

  • Guest
Re: Search expands to include unmatched results
« Reply #5 on: August 05, 2018, 04:18:21 pm »

This is from the wiki:

~expand=fields    Expands the included tracks on the given field.

Example: Expand the tracks to the matching genre:

    ~expand=Genre

I guess putting album in square brackets is telling the search to expand to every album in the database!
Logged
Pages: [1]   Go Up