[Nepomuk] Problem with nepomuksearch

Sebastian Trueg trueg at kde.org
Thu Dec 3 22:04:11 CET 2009


Peter Penz wrote:
> I've recently adjusted Dolphin to use the new Nepomok Query API. I like the 
> API very much, but there is one "minor" problem on my system: I don't get any 
> search results :-(

I noticed but did not look into it yet.

> I build the comparison term this way:
> 
> Nepomuk::Query::ComparisonTerm term(prop, literal, comp);
> 
> In my testcase the values are:
> - prop: 
> QUrl("http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified")
> - literal:
> [Literal "2009-01-01"^^<http://www.w3.org/2001/XMLSchema#date>]

This is already incorrect as the range is QDateTime. Maybe I could add
conversion support to libnepomukquery...

> - comp:
> ComparisonTerm::GreaterOrEqual
> 
> The resulting term is:
>  [<http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> >= 
> [Literal "2009-01-01"^^<http://www.w3.org/2001/XMLSchema#date>]]
> 
> This looks OK. Afterwards I'm doing something like this:
> 
> Nepomuk::Query::Query query;
> query.setTerm(term);
> KUrl url = query.toSearchUrl();
> 
> and url will be:
> KUrl("nepomuksearch:/?sparql=select distinct ?r  where { ?r 
> <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#lastModified> 
> "2009-01-01"^^<http://www.w3.org/2001/XMLSchema#date> .    }")

This is a bug which I did not look into yet either. But I know of it. :P


> So it seems that the >= operator has been removed... I tried to add it 
> manually, but also get no results... Since my update to Virtuoso also "hand 
> made queries" like:
>
> nepomuksearch:/tag:TestTag1
> 
> don't give a result, although there is a tagged file with this tag (see 
> http://enzosworld.gmxhome.de/temp/search1.png and 
> http://enzosworld.gmxhome.de/temp/search2.png). At least just listing the tag 
> works: http://enzosworld.gmxhome.de/temp/search3.png

That is because "tag" matches way too many properties which results in
amazingly long queries. Using "hastag" works though.
I am not sure on how to improve that situation other than maybe only
selecting used properties. But the problem with that is negated terms.
There you also want unused properties I suppose...


> Any hints would be very welcome! Thanks,
> Peter
> 
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
> 


More information about the Nepomuk mailing list