Re: [Tracker] query results depend on locale?



On 12/08/12 11:25, LubomÃr SedlÃÅ wrote:
Hello,

Hello,

I have a problem with executing Tracker queries discovered by
gnome-documents not displaying anything. With help from Debarshi Ray on
IRC (#documents) I found out that even running the queries through
tracker-sparql gives incorrect results depending on locale.

If I run it my normal locale (cs_CZ.utf8), it reports no results.
However, when executed with LANG=C, the same query does indeed find many
results.

Is this behavior a bug or something gone wrong with my system?

I think what you're seeing is this bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=666749

I am running Tracker 0.14.1 installed from Debian Unstable repository.

I only tried two of the queries executed by gnome-documents, but both
have the same symptoms. Following is one of the queries:

I am guessing using libicu doesn't cause this problem for you?

SELECT DISTINCT ?urn nie:url(?urn)
nfo:fileName(?urn)nie:mimeType(?urn)nie:title(?urn)
tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher), '')
tracker:coalesce(nfo:fileLastModified(?urn),
nie:contentLastModified(?urn)) AS ?mtime nao:identifier(?urn)
rdf:type(?urn) nie:dataSource(?urn) ( EXISTS { ?urn nao:hasTag
nao:predefined-tag-favorite } ) ( EXISTS { ?urn
nco:contributor ?contributor FILTER ( ?contributor != ?creator ) } )
WHERE { ?urn a rdfs:Resource OPTIONAL { ?urn nco:creator ?creator . }
OPTIONAL { ?urn nco:publisher ?publisher . } FILTER (( (fn:contains
(fn:lower-case (tracker:coalesce(nie:title(?urn), nfo:fileName(?urn))),
"") || fn:contains (fn:lower-case
(tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher))),
""))) && (((fn:starts-with (nie:url(?urn), "file:///home/user/Desktop"))
||  (fn:starts-with (nie:url(?urn), "file:///home/user/Dokumenty")) ||
(fn:starts-with (nie:url(?urn), "file:///home/user/Downloads")) ||
(fn:starts-with (nao:identifier(?urn), "gd:collection:local:")))) &&
((true) || (false)) && (((fn:contains(rdf:type(?urn),
"nfo#DataContainer")) && (fn:starts-with(nao:identifier(?urn),
"gd:collection"))) || fn:contains(nie:mimeType(?urn), "application/pdf")
|| fn:contains(rdf:type(?urn), "nfo#Presentation") ||
fn:contains(rdf:type(?urn), "nfo#Spreadsheet") ||
fn:contains(rdf:type(?urn), "nfo#PaginatedTextDocument"))) } ORDER BY
DESC (?mtime)LIMIT 50 OFFSET 0

Thanks for any help,

Sadly, with libicu and libunistring, we're in between a rock and a hard place. The bug link above should explain what I mean here...

There is no easy way forward at this point.

--
Regards,
Martyn

Founder and CEO of Lanedo GmbH.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]