Leaving child out from inner results was quite obvious mistake. Now paging works and queries are fast. Thank you!

Mikael


On 4.9.2016 20:31, Andy Seaborne wrote:


On 02/09/16 13:22, Mikael Pesonen wrote:

Sorry for bombing with questions.

No problem in this case though replies may be delayed - the questions aren't always simple things to reply to.

Can you make the data available?


Im trying to add paging with no success:

SELECT DISTINCT ?s ?p ?o WHERE {
  GRAPH ?graph { SELECT DISTINCT ?child WHERE
{{<http://www.lingsoft.fi/ontologies/e882a3c73c56c42a> skos:narrower*
?child}}}
GRAPH <http://www.lingsoft.fi/resource-meta/> {

{ SELECT ?s WHERE {

 ?s <http://purl.org/dc/terms/subject> ?child .
?s <http://purl.org/dc/terms/isPartOf>
<http://www.lingsoft.fi/rdf/uid/57aae39836662> .
      } limit 2 }
 ?s ?p ?o .
} }

So 2nd the inner SELECT ?s will return 2 items and it hides the ?child. You need to add it to the SELECT clause. You might as well call it ?Z - the results are same.

And from that block you get rows of ?s ?p ?o. No ?child - it didn't get out of the "SELECT ?s"

but the first part "SELECT DISTINCT ?child" has ?child columns - it's an unrelated cross product. You'll get all the results for ?child * all the triples of 2 isPartOf items.

If trye:

qparse -print=opt you'll see ?child gets renamed to "?/child" in the second part.

    Andy

This should return two sets of records having dcterms:subject one of
children from ontology query. But I get results where subject seems to
be other random items from same ontology.


This works, except can't set correct limit:

SELECT DISTINCT ?s ?p ?o WHERE {
  GRAPH ?graph { SELECT DISTINCT ?child WHERE
{{<http://www.lingsoft.fi/ontologies/e882a3c73c56c42a> skos:narrower*
?child}}}
GRAPH <http://www.lingsoft.fi/resource-meta/> {

 ?s <http://purl.org/dc/terms/subject> ?child .
?s <http://purl.org/dc/terms/isPartOf>
<http://www.lingsoft.fi/rdf/uid/57aae39836662> .

 ?s ?p ?o .
} }
limit 200


Mikael




On 2.9.2016 12:04, Mikael Pesonen wrote:

But I think we can handle this by adding paging, so not a show stopper...

On 2.9.2016 11:52, Mikael Pesonen wrote:

Tested that one. Example query, similar that Ive sent here, took on
average ~14 secs on 2.3.1 and 13.5 secs on 2.4.1.

So a bit of improvement but we need to get that query to couple of
secs so that its usable for our application.

Mikael


On 1.9.2016 12:40, Andy Seaborne wrote:
On 01/09/16 09:20, Mikael Pesonen wrote:

How do I get the snapshot? I found this page
https://builds.apache.org/job/Jena_Development_Deploy/lastStableBuild/
but how to download?

Mikael

The builds end up in a maven repo:

https://repository.apache.org/content/repositories/snapshots/org/apache/jena/


and you want the "apache-jena-fuseki" module of the SNAPSHOT version:

https://repository.apache.org/content/repositories/snapshots/org/apache/jena/apache-jena-fuseki/2.4.1-SNAPSHOT/


Make sure you scroll down: the newest is at the bottom (just at the
moment it is "20160831.100731-60"

    Andy





--
www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: [email protected]
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Linnankatu 10 A
FI-20100 Turku
FINLAND

Reply via email to