[Nepomuk] Problem with nepomuksearch

Alessandro Sivieri alessandro.sivieri at gmail.com
Thu Dec 3 23:26:45 CET 2009


If I can expand this thread, always about nepomuksearch and the query
library...

First question: I have some code like the following:

Query::ComparisonTerm
cterm(Types::Property(Soprano::Vocabulary::RDF::type()),
Query::ResourceTerm(Nepomuk::Resource(Nepomuk::Vocabulary::NFO::FileDataObject())),
Query::ComparisonTerm::Equal);
Query::ComparisonTerm
fterm(Types::Property(Soprano::Vocabulary::RDF::type()),
Query::ResourceTerm(Nepomuk::Resource(Nepomuk::Vocabulary::NFO::Folder())),
Query::ComparisonTerm::Equal);

then I add the first and the negation of the second term to an AndTerm, then
to a file query with an include folder, and the final result is the
following:

select distinct ?r  where { { ?r <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> .
OPTIONAL { ?v2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder> .  .
FILTER(?v2=?r) . } . FILTER(!BOUND(?v2)) . } .  ?r <
http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> ?v1 .
 FILTER(REGEX(STR(?v1), "^file:///home/alex/nepomuk-kde/misc/")) .  }

which does not find any file, even if I think it should find some, because
the ones in the misc/ subdirectory are correctly indexed by strigi, and I
can find them individually...

And the second question, about the API itself: shouldn't be reasonable to
add a NotEqual value to the ComparisonTerm comparators? I know that there
exists the NegationTerm (which I am using above), but there are all the
comparators but the NotEqual already in the enum, so I think it may make
sense to add it, too.

-- 
Sivieri Alessandro
alessandro.sivieri at gmail.com
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20091203/ac72179e/attachment.htm 


More information about the Nepomuk mailing list