[Nepomuk] (Wrong) Query result count

François daitheflu at free.fr
Wed Jul 25 21:25:22 UTC 2012


Hi guys,

I'm sorry to bump this thread up but I'm still encountering that weird thing :
when I run my query, I never get the same results :(


Here is some code (Python) :

c = Nepomuk.Types.Class(OntologiesUrls.movieType())      #c = NMM::Movie
self.resourceTypeTerm = Nepomuk.Query.ResourceTypeTerm(c)

self.query = Nepomuk.Query.FileQuery(self.resourceTypeTerm)
self.query.addIncludeFolder(somePath, True)

myModel.dirLister().openUrl(self.query.toSearchUrl()) # myModel.dirLister() is 
a KDirLister instance)


Here is the resulting Sparql query :

select distinct ?r where { { ?r a 
<http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#Movie> . ?r a ?v1 . 
FILTER(?v1 in 
(<http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder>,<http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject>)) 
. ?r <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> ?v2 . 
FILTER(REGEX(STR(?v2), '(^file:///home/shared/Films/)', 'i')) . } . }


As in october, the exact same query in NepoSak gives the expected result.

I'll be glad to provide whatever you may need (code, logs,..) :)

Cheers,

-- 
François



Le mercredi 19 octobre 2011 15:17:42 Sebastian Trüg a écrit :
> First thing to do might be this:
> 
> stop the query service (I use the aliases defined below):
> 
>    nsstop nepomukqueryservice
> 
> then start it manually:
> 
>    nepomukservicestub nepomukqueryserviceNMM::Movie
> 
> (this reminds me: we need better handling of the debug output).
> 
> Then perform your query and check the service's output to see if it
> already gets duplicate results.
> 
> Cheers,
> Sebastian
> 
> Aliases:
> alias nsstop="qdbus org.kde.NepomukServer /servicemanager \
>   org.kde.nepomuk.ServiceManager.stopService"
> alias nsstart="qdbus org.kde.NepomukServer /servicemanager \
>   org.kde.nepomuk.ServiceManager.startService"
> 
> On 10/18/2011 05:07 PM, daitheflu at free.fr wrote:
> > Hi,
> > 
> > First I'd like to thank Sebastian for his help and patience ! I really
> > appreciate it.
> > 
> > Running the Sparql query in NepomukShell always gives the expected result.
> > 
> > I suspected my KSortFilterProxyModel to be the cause and tried to replace
> > it by a KDirModel. Unfortunetly, the result was the same : sometimes it
> > works as expected, and sometimes I have all results appearing twice, or
> > just some of them appearing twice.
> > 
> > Is there some cache mechanism involved somewhere that could be the cause ?
> > It really looks like it, although I have nothing in hand to demonstrate
> > it.
> > 
> > Any other idea, or something to check, try ? :/
> > 
> > Cheers,


More information about the Nepomuk mailing list