[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    Re: Top resources
From:       Marco Martin <notmart () gmail ! com>
Date:       2012-04-02 10:04:19
Message-ID: 201204021204.19469.notmart () gmail ! com
[Download RAW message or body]

On Saturday 31 March 2012, Ivan Čukić wrote:
> Hi all,
> 
> There are two things I've noticed in the last devel image:
> - Top resources tab probably should not be shown if there are no top
> resources - Some resources are shown twice (guess the query needs
> distinct(...)) - for some
>   reason, virtuoso seems to find two separate paths for the query rules to
> be fulfilled. (I've added maxCardinality for ResourceScoreCache
> properties just in case)

now the top page and ttab are hidden if empty.
for what matters duplicates i see a pretty strange thing:

i'm getting two entries of the same resource, for the same activity with two 
different scores
O.o

the monster query is 
select distinct ?r ?score ?c ?reqProp1 ?reqProp2 ?reqProp3 ?reqProp4 ?reqProp5 
?reqProp6 where { { ?c 
<http://nepomuk.kde.org/ontologies/2012/02/29/kao#targettedResource> ?r . { ?c 
a <http://nepomuk.kde.org/ontologies/2012/02/29/kao#ResourceScoreCache> . ?c 
<http://nepomuk.kde.org/ontologies/2012/02/29/kao#usedActivity> 
<nepomuk:/res/a254564a-aa57-4abf-b5f2-0200906d8779> . ?c 
<http://nepomuk.kde.org/ontologies/2012/02/29/kao#cachedScore> ?score . } . 
FILTER(!bif:exists((select (1) where { <nepomuk:/res/a254564a-aa57-4abf-
b5f2-0200906d8779> 
<http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated> ?r . }))) 
. OPTIONAL { ?r <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> 
?reqProp1 . } OPTIONAL { ?r 
<http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasSymbol> ?reqProp2 
. } OPTIONAL { ?r 
<http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> ?reqProp3 
. } OPTIONAL { ?r 
<http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description> 
?reqProp4 . } OPTIONAL { ?r 
<http://freedesktop.org/standards/xesam/1.0/core#description> ?reqProp5 . } 
OPTIONAL { ?r <http://www.w3.org/2000/01/rdf-schema#comment> ?reqProp6 . } } . 
?r <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible> ?v1 
. FILTER(?v1>0) . } ORDER BY DESC ( ?score )

ignore all the reqPropFoo, that's mostly to have less dbus roundtrip (and 
those values are ok)

the one that is wrong is ?score that i get two of them

Cheers,
Marco Martin
_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic