Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: search query and multi values tags (Read 788 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

search query and multi values tags

Hi,

I've got an issue related to search query and multi values tags.
I'm searching in my whole library the tracks by an artist simply named "bob".
I could do this query %artist% IS bob
but then it won't return the tracks tagged with multi values, like "bob; nirvana"

In order to include the tracks tagged with multiple artists, I could do
%artist% HAS bob
but then it will return all tracks with bob inside their artist name, like bob dylan, and not all tracks by the artist simply named "bob".

Does someone there have an idea? Thanks!

 

Re: search query and multi values tags

Reply #1
Hi there,

Can you test for each individual multi-value  -

Code: [Select]
"$meta(artist,0)" IS bob OR "$meta(artist,1)" IS bob OR "$meta(artist,2)" IS bob

... And so on, etc, to cover how many multi-values are likely in your library.

(You can test how many values with $meta_num(artist) but I'm not sure it would be necessary, since if any are missing, they would not return results anyway)

Cheers

Re: search query and multi values tags

Reply #2
Hi,
Thanks! It work fine :)
It's slower though, it's the bad side of multivalues tag, once you try to handle them

Re: search query and multi values tags

Reply #3
What are you trying to achieve with the search query in the end?

If it's not for an autoplaylist query or something similar, you could install either Facets or Columns UI (Filter panel) components which can break down the multivalue tags into simple lists automatically. There you could select bob and it would return all corresponding tracks for further use without having to worry about placement within the multivalue tag.

Re: search query and multi values tags

Reply #4
It's a query used in a spider monkey panel script, so it's specific to my code/layout.

Re: search query and multi values tags

Reply #5
Not sure if this would work any faster??

Code: [Select]
let has = fb.GetQueryItems(fb.GetLibraryItems(), 'artist HAS bob');
let is = fb.GetQueryItems(has, '"$meta(artist,0)" IS bob OR "$meta(artist,1)" IS bob OR "$meta(artist,2)" IS bob');

Re: search query and multi values tags

Reply #6
How about this?

Code: [Select]
"*$meta_sep(artist,*)*" HAS *bob*

I'm late