Ticket #1140 (new defect)

Opened 3 years ago

Last modified 3 years ago

Mulgara query returns UnhandledException Error

Reported by: rich Assigned to: dragisak
Priority: medium Milestone:
Component: ambra Version: 0.9.1_rc1
Keywords: Cc:
Blocking: Blocked By:

Description

The query that is hanging Mulgara:

select $cat $a $date from <local:///topazproject#filter:graph=ri>
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri>
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri>
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri>
and (
$oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203'
in <local:///topazproject#filter:graph=ri>
)
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri>
and (
$oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203'
in <local:///topazproject#filter:graph=ri>
)
order by $date desc $a;

The journal has cross-pubbed articles which may affect how this query is generated.

Dependency Graph

Change History

03/13/09 14:40:14 changed by rich

The Ambra default journal has no articles published in it. After I published a single article into the Ambra default journal, the query changed. Now the results return quickly both in run-tql and for the journal homepage. This is the new query – there is an additional "and" in the first subquery that adds the date field:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and (
     $oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
     and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac> 
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>) 
     and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and (
     $oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
     and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac> 
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>) 
order by $date desc $a;

This the query when there are NO articles published in the Ambra default journal:

select $cat $a $date from <local:///topazproject#filter:graph=ri>
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri>
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri>
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri>
and (
     $oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
     and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>

     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>
)
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri>
and (
     $oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
     and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>

)
order by $date desc $a; 

03/13/09 14:57:08 changed by rich

  • milestone deleted.

Workaround is to publish a single article into the Ambra default journal. Moving out of 0.9.2

03/13/09 14:57:15 changed by rich

  • priority changed from critical to medium.

03/14/09 14:55:30 changed by dragisak

The query for journal without cross-published articles:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
order by $date desc $a;

Query when there is at least one cross-published article in the journal:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and (
   $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
   or $oqltmp3_0_1_o1_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
   and $oqltmp3_0_1_o1_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
) 
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and (
   $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
   or $oqltmp3_0_0_o1_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
   and $oqltmp3_0_0_o1_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
) 
order by $date desc $a;