Spotlight support
Ralph Böhme
rb at sernet.de
Sat Apr 12 03:42:13 MDT 2014
Hi
> The search string is "kMDQueryString" which in above case was:
>
> kMDItemContentTypeTree=="public.jpeg"cd&&InRange(kMDItemLastUsedDate,$time.iso(2014-03-10T23:00:00Z),$time.iso(2014-04-10T22:00:00Z))
>
> I'm using a flex/bison generated parser that translates this into
> SPARQL which is then fed to Tracker
fwiw, the mapped SPARQL query then looks like this:
$ ./bin/spotlight2sparql 'kMDItemContentTypeTree=="public.jpeg"cd&&InRange(kMDItemLastUsedDate,$time.iso(2014-03-10T23:00:00Z),$time.iso(2014-04-10T22:00:00Z))'
SELECT DISTINCT ?url WHERE { ?obj nie:url ?url FILTER(regex(?url, '^file:///Volumes/test/')) . ?obj nie:mimeType 'image/jpeg' . ?obj nfo:fileLastAccessed ?a FILTER (?a > '2014-03-10T23:00:00Z' && ?a < '2014-04-10T22:00:00Z')}
$
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
More information about the samba-technical
mailing list