INTERACT FORUM

More => Old Versions => Media Center 15 (Development Ended) => Topic started by: sherbs on February 03, 2012, 04:12:13 pm

Title: Simple search question
Post by: sherbs on February 03, 2012, 04:12:13 pm
How do I search for a song title containing a particular word?

If I'm looking for song titles containing the word 'car', for example, how do find them without seeing names containing carry, careful etc as well?

Thanks.
Title: Re: Simple search question
Post by: Matt on February 03, 2012, 04:19:33 pm
[car]

You might also try the wizard in the search box for advanced searches.
Title: Re: Simple search question
Post by: MrC on February 03, 2012, 04:23:21 pm
Matt - this doesn't work well.

Searching for non, for example, returns things like:

  Donna Non Vidi Mai (Manon Lescaut)
  17th Century Canon

That's good.  But searching for [non] returns nothing.

Searching " non " does work, but of course, only if non is in the middle surrounded by spaces.
Title: Re: Simple search question
Post by: MrC on February 03, 2012, 04:50:12 pm
In lieu of additional responses, if you want to search just the Name field, for an exact term, you can use an expression search:

  [=regex([Name], \bCAR\b)]=1

Replace CAR with the exact word you want, and paste the expression into the search box.  The expression as written is case-insensitive, but can be modify to honor case.
Title: Re: Simple search question
Post by: Matt on February 03, 2012, 04:52:12 pm
Sorry, I mispoke above.

[car] returns only exact matches of car

To search for words inside a string, you'd have to do something more complex, like:
[car "," car "," car]

I'm trying to think if there's some more natural syntax we could offer for this.
Title: Re: Simple search question
Post by: Matt on February 03, 2012, 05:09:56 pm
In a coming build of v17, you can do this:
^car

From the history:
NEW: The search language supports putting a hat in front of a keyword to do word matching (so ^car matches "Car Blues" or "My Car Broke" but not "Carolina on My Mind").
Changed: Hat is an escaped character in the search language, so you must use /^ to search for a literal hat.
Title: Re: Simple search question
Post by: MrC on February 03, 2012, 05:26:27 pm
Works pretty well.

^car

returns 12 results, where the expr. above returns 13.  The difference:

  Ding-Dong Daddy of the D-Car Line

Yet, ^car (and the expr) does find:

  Car/Foot Chase

so it seems there are some non-alpha chars that are considered part of the word, some that are not.

Title: Re: Simple search question
Post by: sherbs on February 04, 2012, 07:54:21 am
Thanks for the replies.

Due to being on MC15, looks like I'll have to go with
Quote
To search for words inside a string, you'd have to do something more complex, like:
[car "," car "," car]

This seems to work but using name=[...] includes Album titles that include the word. Any way to confine it to just song titles?

Thanks.
Title: Re: Simple search question
Post by: MrC on February 06, 2012, 11:52:48 am

Due to being on MC15, looks like I'll have to go with

I'm sorry Sherbs - I entirely overlooked the forum name you posted this under, so misguided you.

Well, on the bright side, now there's yet another feature awaiting your update to MC17.  :-)