|
|
10.5: Add conditional Spotlight parameters to searches
It is pretty cool to examine these searches. The actual query for "Today" is:
10.5: Add conditional Spotlight parameters to searches
I have some .savedsearch(es) from Tiger which I copied to my Leopard box. Most of these savedsearches return zero results. Spotlight has indexed my drive and I didn't see any errors during mdimport. Some of my saved searches were limited to explicit directories (which are the same on both machines) and all of my savedsearches were "hand-crafted" using the Raw Query option. (I've pasted an example: see below)
I'm at a total loss as to why these wont work in Leopard. Oddly, when I double click on a savedsearch and then try to edit the query (Show Search Criteria) none of the query params or strings show up in the Finder UI. Have there been drastic changes to the query syntax? Anyone know where I can find documentation on the new/Leopard query syntax? Tiger savedsearch that doesnt work in Leopard: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CompatibleVersion</key> <integer>0</integer> <key>RawQuery</key> <string>(((kMDItemAcquisitionMake='*Canon*') || (kMDItemFinderComment='*Canon*') || (kMDItemAcquisitionMake='*TOSHIBA*') || (kMDItemAcquisitionMake='*OLYMPUS*') || (kMDItemAcquisitionMake='*SONY*'))) && (kMDItemFSCreationDate >= -63129600) && (kMDItemFSCreationDate < -31593600)</string> <key>SearchCriteria</key> <dict> <key>CurrentFolderPath</key> <array> <string>/Users/paul/Pictures/Photos</string> </array> <key>FXCriteriaSlices</key> <array> <dict> <key>FXSliceKind</key> <string>Sraw</string> <key>Value</key> <string>((kMDItemAcquisitionMake='*Canon*') || (kMDItemFinderComment='*Canon*') || (kMDItemAcquisitionMake='*TOSHIBA*') || (kMDItemAcquisitionMake='*OLYMPUS*') || (kMDItemAcquisitionMake='*SONY*'))</string> </dict> <dict> <key>Clock</key> <real>-63216000</real> <key>FXSliceKind</key> <string>Scre</string> <key>Value</key> <string>DA>></string> </dict> <dict> <key>Clock</key> <real>-31593600</real> <key>FXSliceKind</key> <string>Scre</string> <key>Value</key> <string>DA<<</string> </dict> </array> <key>FXScope</key> <integer>1396925286</integer> <key>FXScopeArrayOfPaths</key> <array> <string>/Users/paul/Pictures/Photos</string> </array> </dict> <key>Version</key> <string>10.4.7</string> <key>ViewOptions</key> <dict> <key>SidebarWidth</key> <integer>135</integer> <key>ToolbarVisible</key> <true/> <key>ViewHeight</key> <integer>382</integer> <key>ViewStyle</key> <string>icnv</string> <key>WindowBounds</key> <dict> <key>bottom</key> <integer>546</integer> <key>left</key> <integer>64</integer> <key>right</key> <integer>814</integer> <key>top</key> <integer>164</integer> </dict> </dict> </dict> </plist>
10.5: Add conditional Spotlight parameters to searches
Ah crap: I think I figured it out. Somehow all the <, >, =, etc chars have been converted into their xml entities/equivalents. How annoying: I wonder which app or OS was responsible for doing that?? :(
10.5: Add conditional Spotlight parameters to searches
[This comment actually applies to the main article, but the "post a comment" link is missing.]
I had a difficult time getting this hint to work, for a couple of reasons. So I'm posting this for the benefit of others: First, the phrase "In a Spotlight search window" means "In a Spotlight search *results* window" (i.e., the larger window that appears after performing a search in "little Spotlight" in the menu bar). Secondly, the next step in the hint is "holding down the Option key while clicking the add button." I kept option-clicking the add button, but was not seeing *any* of what this hint described. Finally, I discovered that in the Action menu (the rectangular button with the gear icon) there's an item called "Show search criteria." This feature has to be enabled (i.e., criteria showing) in order for this hint to work. I'm surprised this wasn't mentioned in the hint. Especially since it seems to be disabled by default. (Either that or some setting carried over from Tiger caused it to be disabled on my machine, preventing this hint from working.)
10.5: Add conditional Spotlight parameters to searches
To post a new comment, use the top-level "Reply" button in the comment bar just below the article. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.18 seconds |
|