INTERACT FORUM

Please login or register.

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

Author Topic: How to search for artists named as "***, the"  (Read 1411 times)

lasker98

  • Junior Woodchuck
  • **
  • Posts: 74
How to search for artists named as "***, the"
« on: May 30, 2012, 07:28:30 am »

I'm trying to learn some more advanced techniques in MC (advanced for me, I'm sure still pretty basic for most). I'd like to start with learning how to do a search of my library for all artists tagged with a trailing The. For example, "Beatles, The", instead of "The Beatles".

I would appreciate very basic instructions, especially where exactly to input whatever search data I need to use to achieve this and how to set up the view/panes if necessary. I'm starting to read a beginners book on expressions but at this point with MC, I don't even know where I would enter an expression even if I knew how to create and use one.

As well, what "flavour" of expressions does MC use? The book I'm reading refers to Perl, Java, Javascript, .Net, etc.

Thanks in advance,

Bill
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: How to search for artists named as "***, the"
« Reply #1 on: May 30, 2012, 09:04:53 am »

for example if put in the search panel upright the following will filter all artist names which ends with 'the'
[Artist]="the]
other way around would be
[Artist]=[the"

If you want to modify your view permanently you'll need change the view itself:
right click above the view name -->> customize view -->> settings panel --> included files -->> set rules for file display
If you have already complete expression in clipboard you can the use import / export to paste your expression. Otherwise you can use the GUI rules generator for simpler expressions. GUI also has some example stock rules which you can then examine and learn in the import /export window

You can also make a column which is an expression. Right click above some column header in the view and select 'Add expression column'
You could e.g. make a column which indicates if artist has trailing "the" by inserting following to the expression editor opened:
If(IsEqual(the,right([Artist],3),1),YES, NO)  

Marko's beautiful expression wiki is a good place to have in the bookmarks:

a little bit messy explanation but hopefully gets you going
Logged

lasker98

  • Junior Woodchuck
  • **
  • Posts: 74
Re: How to search for artists named as "***, the"
« Reply #2 on: May 30, 2012, 01:39:39 pm »

Hi lepa,

Thanks for your response. I was able to use your suggestion with no problems in the top right search bar.

I then tried to follow your instructions to modify the view permanently. In the "Edit Search" box that opened, I typed the expression in the second box to the right in the "Add New Rule" section at the top. The first box is the one with the drop down to select the standard items which I left empty. After clicking Apply, then "OK",  the correct artists (with trailing "the") came up in my artist pane. When I went back to "Set rules for file display", in the "Edit Search" box that opened, instead of showing your expression that I typed, it now shows in the first box "Artist", second  box to right shows "contains" and third box shows "the". When I now click apply and ok, the Artist pane shows all artists which contain "the" in any form, which is not what I wanted. So for some reason I was unable to make it a permanent view. Any idea what I did wrong?

I realize my original search must seem very basic to anyone that already knows their way around MC, but for me, I just wanted to pick a simple task and use it as a learning exercise. I find this type of thing to be the hardest part for me in using MC. There's a lot of different information through the forums and Wiki, but at least to me, it all seems to assume you know where to apply and use this information. In this case, I may be able to read about expressions and copy ones that have been posted, but where do I actually apply them? When I use the help for "Edit Search" it takes me to the Wiki about smartlists. It shows lot's of different expressions but again, it doesn't say anything about where you actually put those once you've created them. As well, that Wiki help for the smartlists doesn't seem to apply to the way the "Edit Search" window currently works, which seems to be a wizard to make selections. I don't know if it was written for an earlier version of MC that used a different window setup for "Edit Search".

Thanks again,

Bill
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: How to search for artists named as "***, the"
« Reply #3 on: May 30, 2012, 02:30:02 pm »

It is going to take you some time to become familiar with how MC works.

Here's a good MC17 view tutorial.

There are a number of places to have MC perform searches such as Search box (text or wizard mode), Views, Quick Search.

The Search box is essentially a temporary filtering tool used to filter a view.  Use it to quickly narrow lists or find items.  You can review my work in progress on Searching.

Views are used to display items for given tasks (such as viewing by Genre, or Artist thumbnails, or Albums).  Think of views as semi-permanent.  If you find yourself repeating a selection task, customize a view, adding for example, some expression column to select the appropriate files.  You can use expressions or Search Lists to allow quick selection of matching files.  While you could create a single view to show items that end with ", The", there are ways which will be more useful, such as creating a single view, that allows you to select items that match certain patterns.  For example, try customizing a panes view and adding an expression column using the value:

   If(Regex([Artist], /#, the$#/), Ends with The, NOPE)

You can later add to the expression creating a list of items to select from, such as items that end with ", A" or start with a non-letter, etc.
Logged
The opinions I express represent my own folly.

lasker98

  • Junior Woodchuck
  • **
  • Posts: 74
Re: How to search for artists named as "***, the"
« Reply #4 on: May 31, 2012, 07:30:44 am »

Hi MrC,

Thanks for taking the time to reply.

I have used that view tutorial to get started with setting up custom views. I will have to go through it a few more times at least for sure.

I tried going to your link but it came up with "There is currently no text in this page." The page did come up with "MrC-temp/Searching" as the heading so I'm hoping I entered the url correctly. I had to change the "]" between temp and search to a forward slash to get into the wiki at all, so I may have done something wrong.

I also tried a new view with the expression as you suggested. I created a new custom view in Audio, called "Search Test". I selected "panes" under "View As". In the "Show Categories In This Order" box I used "Add", then under "Type" I selected "Expression". I named it "MrC_01". I then copied your expression into the expression box and clicked OK, then OK again to exit the Customize View setup window. Once that was done, I had a single pane at the top with "MrC_01", then "All MrC_01 (1)" below that and "NOPE" below that. In the results below that I have all my artists showing by album with individual tracks. I only have one artist ending with ", The". I'm guessing I should have ended up showing only that one artist, so I must have done something wrong. I double checked and everything is the way I described above.

Thanks,

Bill
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: How to search for artists named as "***, the"
« Reply #5 on: May 31, 2012, 07:51:36 am »

Sorry, I fixed the link above.  I missed an = around the URL bbcode.

Here are some screenshots that show how the expression works and is setup.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: How to search for artists named as "***, the"
« Reply #6 on: May 31, 2012, 07:55:43 am »

A slight modification to the expression will also select artists that end with ",the" (i.e. the space after the comma being optional):

  If(Regex([Artist], /#,\s*the$#/), Ends with The, NOPE)
Logged
The opinions I express represent my own folly.

lasker98

  • Junior Woodchuck
  • **
  • Posts: 74
Re: How to search for artists named as "***, the"
« Reply #7 on: May 31, 2012, 08:44:44 am »

Thanks MrC.

That link looks like a fantastic resource. I'll use that for sure. I don't have time to try anything now but I wanted to thank you for replying again.

Bill
Logged
Pages: [1]   Go Up