Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Add conditional Spotlight parameters to searches' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Add conditional Spotlight parameters to searches
Authored by: ppmax on Oct 30, '07 09:33:31PM
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*'))) &amp;&amp; (kMDItemFSCreationDate &gt;= -63129600) &amp;&amp; (kMDItemFSCreationDate &lt; -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&gt;&gt;</string>
</dict>
<dict>
<key>Clock</key>
<real>-31593600</real>
<key>FXSliceKind</key>
<string>Scre</string>
<key>Value</key>
<string>DA&lt;&lt;</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>


[ Reply to This | # ]
10.5: Add conditional Spotlight parameters to searches
Authored by: ppmax on Oct 30, '07 09:55:47PM

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?? :(



[ Reply to This | # ]