On 13/06/13 01:13, Ivan Frade wrote:
Hi,
Hi,
To be more precise, Tracker can solve queries much more complicated than
those... but you need to be specific on the properties.
For example "Give me the title property of all instances of class Music,
that have an artist [property linking to an artist instance] with name
"Metallica".
Indeed, if you want to see an example of this, from the console, run
tracker-needle:
$ export TRACKER_VERBOSITY=3
$ export G_MESSAGES_DEBUG=all
$ tracker-needle
...
You will see queries like this for music (which can be reasonably complex):
"""
SELECT ?urn nie:url(?urn) tracker:coalesce(nie:title(?urn),
nfo:fileName(?urn)) fn:string-join((?performer, ?album), " - ")
nfo:duration(?urn) nie:url(?urn) WHERE {
{
?urn nmm:musicAlbum ?match
} UNION {
?urn nmm:performer ?match
} UNION {
?urn a nfo:Audio .
?match a nfo:Audio
FILTER (?urn = ?match)
}
{
?match fts:match "love"
} UNION {
?match nao:hasTag ?tag .
FILTER (fn:contains (fn:lower-case
(nao:prefLabel(?tag)), "love"))
} .
?urn nmm:performer [ nmm:artistName ?performer ] ;
nmm:musicAlbum [ nie:title ?album ] ;
nie:url ?tooltip .
} ORDER BY DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn)) OFFSET
0 LIMIT 500
"""
--
Regards,
Martyn
Founder and CEO of Lanedo GmbH.
_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
https://mail.gnome.org/mailman/listinfo/tracker-list