[Mulgara-general] Using Lucene from SPARQL

Paul Gearon gearon at ieee.org
Thu Aug 12 20:14:43 UTC 2010


On Thu, Aug 12, 2010 at 3:55 PM, Alex Hall <alexhall at revelytix.com> wrote:
<snip/>
> I suspect it's an issue in the Lucene symbolic transformation code
> (LuceneTransformer.java) -- this only converts a Constraint to a
> LuceneConstraint if its model expression is the URI of a Lucene graph.
> This holds when the graph URI is set using the TQL "in" keyword, but
> when the default graph or FROM graph is used then the constraint model
> is the special variable "$_from".  The transformer needs to be able to
> recognize the case where the constraint model expression is $_from and
> the FROM or default graph is a Lucene graph, and this information is not
> available from the context at the moment.

Ah yes, I remember going through this a little while back. I'm really
not happy about the way this part of the query gets processed, since
working on $_from until the last minute tends to take resolution down
several sub-optimal paths, and almost explicitly avoids certain
optimizations. It was in the back of my mind to rationalize this at
some point, but it's had an extremely low priority.

I also expected the transformer to be the culprit, but I had forgotten
about the whole "magic variable" thing with $_from.

For anyone interested, the query processor recognizes the different
patterns to be resolved against a Lucene graph, and understands that
they are all building blocks for a single constraint against that
graph. The issue here is that there are several ways of representing
that a pattern is being applied to a particular graph, and the Lucene
specific code doesn't recognize them all.


Regards,
Paul


More information about the Mulgara-general mailing list