Spotlight searches using operators

Recently learned that Spotlight can use operators to search, eg. "album:albumname," etc., but I have found that "song:songname" doesn't work. I find it very taxing to have to remember either the album (or artist, which successfully searches) of every song on my Mac. Anyone know if there is an Automator/Terminal way to add this to Spotlight's searching parameters?

It seems that I (somehow) wasn't thinking at all when I posted this question. I now realize that only typing the name of the song will bring it up, so that part of my question is answered. Not sure how I overlooked something that monumental.
In regards to the larger question here, is there any way to add other operators to Spotlight search? I have found articles on 10.5 which claim that the ones that exist are in "/System/Library/Frameworks/CoreServices.framework/...," but that folder doesn't exist in 10.6.2. Has this been moved?
Message was edited by: The Incendiary

Similar Messages

  • Using AppleScript for launch a raw-query Spotlight search?

    As per usual with my limited scripting skills, I am finding the apparently simple stuff rather difficult to achieve.
    My problem with Spotlight is that I want to use the same type of raw query repeatedly, but I want to avoid the tedium of having to:
    1) open my saved search
    2) choose "Show Criteria" to make the saved raw query visible
    3) edit the text field containing the raw query, where the visible stuff is not what I want to edit, so I have to scroll to the right within that tiny field
    So my idea would be to design a simple UI with AppleScript that
    1) pops up a dialog asking for a phrase to search
    2) launches a Spotlight search using the raw query:
    kMDItemTextContent=="xxx*"
    where "xxx" is the phrase that I am searching for, and opens a Finder window with the results of that search.
    My reason for wanting to do this is that, by default, a search for an exact phrase with Spotlight fails to return matches that contain the plural form when the searched phrase is a singular.
    See:
    http://www.betalogue.com/2010/05/07/spotlight-plural/
    http://www.betalogue.com/2010/05/11/spotlight-phrase/
    for more information about the background for this.
    Would this be relatively easy to do with AppleScript?
    Thanks in advance.
    Pierre

    Hi
    Pierre Igot wrote:
    Am I correct in assuming that this means that what I wanted could not just be achieved with AppleScript and required a Perl script?
    Message was edited by: Pierre Igot
    A smart folder is an XML file (PLIST), you can edit it in many ways.
    It's possible with other shell commands (sed or awk).
    But perl works seamlessly with extended characters (ASCII > 127)
    Also it's possible with AppleScript commands (open for access, read, write, close access), or with *property list file* in System events
    But it requires more lines of code.
    Here's the script :
    global a_text
    set smartFolder to "/Users/jack/Library/Saved Searches/Recherche dans “Bureau”.savedSearch"
    set a_text to text returned of (display dialog "Enter a phrase to search" default answer "")
    if a_text contains """ then
    set a_text to findAndReplace(""", "\"", a_text)
    end if
    tell application "System Events"
    set TheXML to property list file smartFolder
    repeat with i in (get property list items of contents of TheXML)
    set t_name to name of i
    if t_name is "RawQuery" then
    tell i to set value to my replace_text(get value)
    else if t_name is "SearchCriteria" then
    tell property list item 2 of property list item "displayValues" of property list item 1 of property list item "FXCriteriaSlices" of i to set value to my replace_text(get value)
    else if t_name is "RawQueryDict" then
    tell property list item "RawQuery" of i to set value to my replace_text(get value)
    end if
    end repeat
    end tell
    set smartFolder to ((POSIX file smartFolder) as alias)
    tell application "Finder"
    activate
    open smartFolder
    end tell
    on replace_text(t)
    set x to the offset of "kMDItemTextContent==" in t
    set L to length of t
    repeat with i from L to 1 by -1
    if character i of t = """ then
    set y to i
    exit repeat
    end if
    end repeat
    return (text 1 thru (x + 20) of t) & a_text & (text y thru -1 of t)
    end replace_text
    on findAndReplace(tofind, toreplace, t)
    set ditd to text item delimiters
    set text item delimiters to tofind
    set t to text items of t
    set text item delimiters to toreplace
    set t to t as string
    set text item delimiters to ditd
    return t
    end findAndReplace

  • Spotlight search freezes

    On my iPhone 4S running iOS 5.1.1, when I try to type in a string in a spotlight search using the soft keyboard, the device freezes for about 5 to 8 seconds before resuming. Usually this happens when as I am typing the search string out.
    Any suggestions?

    If a reset didn't help, the next step is to restore from backup...sync first to create a current backup, then right-click in the left device pane & select "Restore from Backup". Follow this by syncing your iTunes content back to your phone. If no change after restoring from backup, the next step is to restore as new, again followed by syncing your iTunes content back to your phone.

  • I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it

    I accidentally quit my CC on my Macbook pro and now the cloud icon is grayed out and every time I hover over it with the mouse I get the spinning beach ball of death on the icon. I have no idea how to open it because when I use spotlight search to open it it gives me a message saying "Creative Cloud is not open anymore" help!

    Since you didn't include any pertinent info such as the Mac model and OS version you are running, here is some general information:
    Mac OS X: Gray screen appears during startup
    Depending on which OS yours came with originally - and which OS you are now running - you would either need your original install disks - you can call Apple for replacements by giving them your serial number. Or you may be able to reinstall the OS by using recovery (again, depends on which model/which OS).

  • When using spotlight search on my 5s it will not show past text messages that haven't even been deleted even if I type a specific word that I know is in a message I want to search for. I have message search turned on in the spotlight settings.

    When using spotlight search my phone will not show all text messages with a common word even though I have not deleted any messages from my phone and I have the message search turned on in settings under spotlight search. The search only shows the messages that are recent within the past day or so. Why won't it show the other messages when I search for them even using a specific word that I know was in the message I'm searching for.

    Hello ChiomaM,
    It sounds like you are not getting notifications for new text messages that are coming in, and you must manually check the app. I recommend checking the Notification settings to see if they are configured correctly:
    iOS: Understanding notifications
    http://support.apple.com/kb/ht3576
    iOS apps can provide three types of notifications:
    Sounds: An audible alert plays.
    Alerts/Banners: An alert or banner appears on the screen.
    Badges: An image or number appears on the application icon.
    You can view which apps provide notifications and adjust notification settings using Settings > Notification Center. For additional information, refer to the user guide for your device.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • How to use the spotlight search for photos imported onto an apple ipod model MB528BT

    I have an apple ipod model MB528BT version 4.2.1 (8C148) Im think its an iPod touch as opposed to the old iPod but cannot be certain. So first of all does this model number mean anything and/or can I confirm myself via the unit itself?
    Assuming its an iPod Touch my question is :-
    I have copied photos from a dvd I purchased for identifying birds onto my iMac which I readily search via spotlight.
    Having downloaded these photos onto my ipod when I conduct a spotlight search it only finds the birdsong but not the image! Cannot get into settings for spotlight to set for images. If of course this is the answer.
    Anyone know the answer please!
    Thanks David

    "also i use imessage alot so when somebody sends a message who will get it the ipad or the ipod?"
    Both
    You can sync as many ipods/ipads/iphones as you like to one computer.

  • Boolean operators (and/or, etc.) in bridge spotlight search?

    Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
    I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
    Would be much obliged for any help, thanks!

    Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right?
    I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways.
    Would be much obliged for any help, thanks!

  • Are messages sorted by date when you use spotlight search on iphone / ipad?

    When you use spotlight search on an ipad or iphone, and you are searching specifically for text messages,  how are the results sorted?
    it doesnt look like they sort by date modified, or do they?

    i mean Imessages not SMS messages

  • Desktop is black and dock disappeared. I have to use spotlight search to open apps. How do i fix this?

    My desktop is black and the dock is not on my screen. I have to use the spotlight search to open apps. When i log in guest user everything works fine. It's only my account. How can i fix this?

    open spotlight and type the name of any folder. Select it. A finder window will open. Basically you just need a finder window. right click on the title of the window. You will get a dropdown menu. Select the name of your hard disk ( most probably "Macintosh HD") now you will see a folder named system alongside applications, users, library, etc. click on the system folder. Then click on the library folder which is the only folder that appears once you get inside system folder.
    now scroll down and find CoreServices folder. Open it and then find dock.app and open it.

  • Is there any way to use Quickview from within Spotlight search results?

    I'm sure this has been answered previously, but my searches came up empty....
    Is there any way to use Quickview from within Spotlight search results? I'd like to be able to do a Spotlight search and hit the space bar for a quick Quickview look before actually launching the program. I'm guessing this isn't possible, but thought I'd ask...

    Thanks, Kappy.
    Duh...I meant Quick Look. Sorry about that.
    In any event, pressing the space bar in Spotlight just puts a space in the Spotlight search box - it doesn't open a Quick view of the highlighted item...

  • Does Mail search use Spotlight?

    In Apple Mail, the search functions work poorly for me. I can find things by the category "From," for example, but searching for something in the "Entire message" doesn't find things that are there.
    Does Mail use Spotlight for its searches? I have disabled it because it slowed down my old iMac too much.

    Yes, Mulder is right, Mail Uses Spotlight for the Entire Message search (but not the To, From or Subject).
    I am also running on a flat panel G5 iMac and found that with a clean Spotlight Database, Spotlight really speeds up and makes searching in Mail invaluable.
    See my post below....
    ===
    Leopard Mail Entire Message Search - FIXED!!!
    My Original Post is here:
    http://discussions.apple.com/thread.jspa?messageID=7462907#7462907
    Posted by: DaveC
    This is a known issue. Check out:
    http://www.betalogue.com/2008/02/25/mac-os-x-105-tip-repairing-broken-spotlight- searches-in-mail/
    http://www.betalogue.com/2008/03/28/mac-os-x-105-broken-spotlight-indexing-for-m ail-messages-caused-by-presence-of-older-mail-application/
    Thanks Dave. I went to Betalogue and went through all the posts and I finally found a way to fix the Search Entire Message Spotlight problem in Apple Mail - at least it worked for me. I have been trying to fix this with all sorts of solutions for months and it turns out it was related to a problem with the Launch Services Database. I confirmed this by looking inside my user/library/mail folder and seeing that inside each Mailbox folder, the sub mailboxes all had standard folder icons and not the inbox tray style icons.
    Note that you can easily fix this through Terminal Commands, and not all the following steps are completely necessary, but there are many people looking at these threads that want to just push buttons...
    *== So here are my simple steps to fixing Apple Mail Search ==*
    1. Attach and turn on any external hard drives you have that may have a copy of Mail.app on them
    2. Delete all OLD copies of Mail.app that you can find (don't worry about Time Machine), but make sure you keep the latest version of Mail.app in your working Applications folder.
    ~ This is so that the LaunchServices database won't easily become corrupt again
    3. Install the latest version of Onyx - free to use and download from www.macupdate.com
    ~ I suggest Onyx, because some people don't want to mess with the Terminal.
    4. Quit all open applications and run Onyx (it will want to check your Hard Drive etc...that's OK).
    5. Go to the Maintenance pane and then the Rebuild tab and select only the LaunchServices box. Click Execute.
    ~ This should fix the primary problem with searches
    6. When that process finishes, select only the Mail's Envelope Index box. Click Execute.
    ~ This should fix related problems with other searches
    7. When that process finishes, select only the Spotlight Index box. Click Execute. (This process of Rebuilding your Spotlight Index could take hours depending on how big your hard drive is).
    ~ This will give you a clean fast Spotlight database that Mail uses for Entire Message searches.
    8. Quit Onyx
    9. Open Mail.app and test your Entire Message Search!
    ====
    Hope that helps - it certainly, finally, did for me!
    Bryce.

  • Why my old emails show up when I use the spotlight search?

    why my deleted emails show up when I use the Spotlight search?

    Hi ..
    Try a reset.
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    No data is lost due to a reset.

  • After Mavericks update spotlight search menu gone, not possible to use spotlight at all

    Hello,
    I updated last week to Mavericks and since the update Spotlight is completely gone.
    It's not possible any more to get to the spotlight search at all. I checked the Spotlight in the preferences the keyboard short-cuts (apple default) are still enabled but nothing happens.
    Even the spotlight magnifier icon in the menu bar is not there any more.
    Can anybody help?

    Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock those files and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Back up all data.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
    sudo find ~ $TMPDIR.. -exec chflags nouchg,nouappnd {} + -exec chown $UID {} + -exec chmod +rw {} + -exec chmod -N {} + -type d -exec chmod +x {} + 2>&-
    This time you'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button
    Select
               ▹ Restart
    from the menu bar.

  • Why is my spotlight search slow/unresponsive in IOS 7... specifically when I start the search with the letters "n" or "c".

    I have an iPhone 5 that must be just over a year old now. I don't remember exactly when this problem started, but I think it was right after updating to IOS 7. The problem is that with certain searches, such as "chrome" or "calender", the spotlight search will basically do nothing. It is somewhat random. Sometimes it will work imidiatly as I am typing it like it usually did. But other times, I will write out the whole word, press search, and still nothing will come up.
    As I was just testing it now, I came up with an interesting discovery. I tested every letter of the alphabet and while 24 of them immidiatly worked fine like usual, it was actually only searches that started with "n" or "c" that did not work. Perhaps the reason I noticed this so much is because some of the apps I use all the time are Chrome, Calender, Notes, Contacts, Calculator, Clock, Camera (wow- just realized how many apps started with "c"!).
    While in spotlight, if I type in C or N and then delete it and try to type another letter that would work normally, it does not work. So if I type in N and then delete it and type in A, A will not come up with results like it would if I just started with A. But if I close and reopend spotlight search and then type in A, it works fine.
    When spotlight search is unresponsive if I wait for about a min sometimes results will actually come up, other times it will sort of crash (it will just randomly close before any results came up).
    I could go on and on with the little details concerning this problem but I do not know what info would/would not be useful to you guys. I have tried restoring my phone from a backup and nothing changed. I am updated to the most recent version. My phone has never been jailbroken and otherwise is in perfect shape.
    Thanks for reading,
    Matt

    I've seen this happen before, and generally turning off Documents and Data in Settings > iCloud will fix it.
    If that doesn't work, try the following.
    1. Restart the phone and check it out.
    2. Reset the phone (hold the home button and the lock button until you see an Apple Logo and then let them go).
    3. Go into Settings > General > Reset > Reset all Settings and test it out again
    4. If none of the above work, try creating either an iTunes backup or an iCloud backup and restore the device as new using iTunes. Here's an article to help with that: http://support.apple.com/kb/ht4137

  • Mail+Spotlight Search Not Working in Lion

    I've been dealing with this problem for over a month and have not been able to fix it.  Search works fine in Lion on several computers, but on my laptop it still won't do a complete search.  It will only pull up emails from people in my contacts list..... no subject key word searches or people outside my contacts searches..... very frustrating! The searches also don't work in Spotlight, so I can't use spotlight as a backup.
    I've tried rebuilding my mailbox.... deleting and recreating the account.... tossing out the Envelope Index folders in the Mail library... Deleting and re installing my search window, etc...... I see lot's of other people with the same issue. It's frustrating when your running your business on your computer and have to deal with a flaw in a new OS..... it was working fine in Leopard..... whats up APPLE?  Please help! 
    Other Info:
    Macbook Pro 2008 Version with 2.5 Ghz Intel Core 2 Duo
    Running 10.7.4

    Glenn,
    Regarding adding and deleting the System Drive from the Spotlight Privacy Tab...... I'm following your sequence, but when I come back to Spotlight Search in the menu bar it just works the same.... no mention of indexing. What's interesting is that "Mail" dosn't appear anywhere in search results when a keyword search is performed via spotlight.
    Regarding the "enevelope Index Files" ..... I followed the instructions and quit and re-opened mail as instructed.  When I re-opened Mail I selected "continue" and the program began to index the contents of mail for about 30 minutes.  I thought that would would fix the issue, but it's still not working. 
    I've tried to compare the account setup from my IMAC which works fine to see if I have something setup wrong in the account, but everything looks the same. 
    I guess I can try to re-index again?  Don't know what else to do? 
    Thanks,
    Bill

Maybe you are looking for