[Mulgara-dev] shouldn't this work? Lucene and Subquery

Life is hard, and then you die ronald at innovation.ch
Mon Dec 22 11:55:45 UTC 2008


I just wanted to give a quick update and let you know that this hasn't
been forgotten or ignored. In short, yes it should work.

On Fri, Dec 12, 2008 at 02:53:18PM -0500, David Smith wrote:
> Could someone please look at these queries.
> I converted them to use data from the tutorial...  you need to fix line
> 6 (jar path)
> It seems that when I combine a lucene query and other subqueries it
> generate a Transaction error..
> 
> Tested against 2.0.7.
[snip]
> # fails
> select $s 
> subquery (
> 	select $y $z
> 	from <rmi://localhost/server1#sampledata>
> 	where
> 		$s $y $z
> )
> from <rmi://localhost/server1#sampledata>
> where
> 	$s $p $o and
> 	$s $p 'W*' in <rmi://localhost/server1#sampletext>
> ;
[snip]
> java.io.IOException: Error accessing the results of the query: Transaction error

I haven't completely traced everything yet, but so far this looks to
be a bug in core subquery and constraint-transformation code, i.e. not
a bug with the lucene-resolver per se (though I did find a couple
issues there while digging into this).

AFAICT what's happening is that the answer returned to the app has
unresolved answer objects for its subqueries; when those subquery
answers are retrieved, it the attempts to run the subquery, at which
point the constraint-tranformations are applied to the subquery in
DatabaseOperationContext.transform(). The problem is if any symbolic
tranformation occurred, then tranform() will close the query (and
answer) and create a new one - and when the app then tries to read
anything it finds that the subquery answer has closed, leading to the
above exception.

It looks like this may be non-trivial to fix. But I need a little more
investigation. Comments from anybody who knows this code better are
appreciated.


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list