[Nepomuk] Query result count

François daitheflu at free.fr
Tue Sep 27 21:41:31 UTC 2011


There it is :

select distinct ?r where {
     {
         ?r a <http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#Movie> 
.
         ?r a ?v2 .
         FILTER(?v2 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> ?v3 
.
         FILTER(REGEX(STR(?v3), '(^file:///home/shared/Films/)', 'i')) .
     }  .
     ?r <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible> 
?v1 .
     FILTER(?v1>0) .
 }

Thanks for your interest and patience :)

-- 
François


Le Mardi 27 Septembre 2011 14:02:45, Sebastian Trüg a écrit :
> Yes, please provide the generated SPARQL.
> 
> Cheers,
> Sebastian
> 
> On 09/27/2011 10:23 AM, François K. wrote:
> > Hi guys,
> > 
> > I finally managed to build my query and got it working, thanks to
> > Sebastian :) (I was trying to query a linked directory, which isn't
> > supported atm.)
> > 
> > But I still have a little problem with it : the exact same query doesn't
> > always return the same number of results. In my case, my query should
> > always return 9 results, but it sometimes return 11, 12, 18, ... When
> > the results are > 9, I've noticed that some resources are returned twice
> > or sometimes even more.
> > 
> > My query is very simple : return all Resources of Type "NMM::Movie" that
> > are stored in one specific directory (and its subdirectories).
> > 
> > Any clue ? Anything I can provide to help ?
> > 
> > Thanks again,
> > 
> > Cheers,
> 
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk


More information about the Nepomuk mailing list