Despite my mental reservation about Spotlight , it really can do some amazing things . see digital exposure . With every image you snatch , a wealth of data is recorded with the picture . on the dot what info your camera seizure depends on its make , but most include introductory item such as aperture , focal duration , and picture ( shutter speed ) . When you place photograph on your Mac , Spotlight say and indexes this entropy , do it potential to run some interesting lookup .
For instance , you might ask Spotlight to find oneself all of your image with foresightful photo — perhaps those with exposure time that were over a third of a second or so . ( A normal exposure sentence might be close to 1/60th of a second . ) To do this you ’d in all probability trade to the Finder , shoot Command - F to impart up the search loge , and then click the Plus house to add a stipulation . You ’d expend the Kind dada - up to choose Other , then select Exposure Time from the tenacious list of option . In the next pop - up , you ’d take Greater Than , and then enter .333 in the input box next to that . When complete , the query would look like this :
When you persist the search , however , you ’ll get quite the surprisal : it will findeveryimage that has an photograph time economic value . Why ? Because Spotlight does n’t like the non - integer value—.33 . It exchange this routine to a zero before running the enquiry . Hence , it finds every photograph that has a “ nifty than zero ” exposure clip , which will be all of them .
This does n’t just happen with values that are less than one ; it happens any time you need to seek to find a non - integer value for an image - related battlefield . Spotlight is n’t rounding the entries up to the next whole turn , either , it ’s just taking the whole number portion . So if you were to try searches with note value of 2.99 , 2.50 , and 2.25 for a sure field of operations , Spotlight would simply utilize 2.0 as the search economic value .
How can you avoid this problem when look for image - related Spotlight data ? You need to use aRaw Query . In other words , you need to compose your query in Spotlight ’s aboriginal terminology . Every clock time you research for something , limelight converts your born - looking query into this language . So when you look for file using the search string Exposure Time Greater Than 2 , for example , spot commute that string into a maths expression that looks like this :
ThekMD … bite is the name of the actual field ( ormetadata ) that hold the exposure time .
To create a Raw Query that work our integer problem , bring up the New Search window ( Command - F ) and choose Other from the Kind pop - up menu . In the list that appears , choose Raw Query and select OK :
( posting that I ’ve choose the Add to Favorites option . This place the Raw Query entrance directly on the inclination of items in the Kind pop - up menu , making it much easier to reach out in the hereafter . )
In the Raw Query text field , typekMDItemExposureTimeSeconds > 0.333 . The search will run as shortly as you type in the mathematical value . When the lookup is done , you ’ll rule the results to be much different than what you got with the hunting drawing string you used before :
As you could see in the bottom windowpane , there are only 15 images on my auto with exposure time over a third of a 2d , not 8,152 as indicated by the results in the uppermost window .
So that ’s how you puzzle out the trouble . But how did I obtain out the crazy term ( kMDItemExposureTimeSeconds ) Spotlight practice or else of “ Exposure Time ” ? That ’s good to know , because , of course , you could use Raw Query mode for any hunting , not just to work around this whole number note value problem . The easiest means to find out what metadata you’re able to look for is to open Terminal ( /Applications - > Utilities ) and then change into a directory incorporate icon , such asyour user folder- > delineation oryour user folder- > iPhoto Library booklet .
To do this with your Pictures pamphlet , typewrite the following in Terminal , and then beseech Return :
Now you just take to find a photograph so you could see what metadata it maintain . The commandlswill show you what ’s inside the folder . To see what public eye field you may question on the file , typemdls “ somephoto.jpg ” , wheresomephoto.jpgis the name of the photo you ’d like to check .
When you press Return , you ’ll see a long list of item that start with the letterskMDItem … . These are the metadata items that you may use in a crude query . If you ’re searching for time - link particular in a picture , for instance , these are the three fields you demand to know :
you may practice any of these you like in a Raw Query to discover picture based on non - integer values . Once you ’ve bunk a search once , retrieve you may use the Save push to make it gentle to recall that question again in the future . If you do this kind of thing a lot , regard setting up three save queries , one for each field . When needed , just opened the save search , and then edit the comparing and economic value as necessary for the hunt you ’d like to run . Hopefully a future OS ecstasy update will address this problem , as these field should be fully searchable using the standard Spotlight interface .
Intrigued ? To learn more about using Raw Queries , see “ veer Through the Clutter . ” To teach more about Spotlight metadata , see “ Command the Spotlight . ”