You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Justin Edelson <ju...@justinedelson.com> on 2014/06/16 23:04:23 UTC

How to actually use IndexPlan to store the index details?

Hi,
As part of OAK-1894[1], I was looking into converting PropertyIndex to
an AdvancedQueryIndex in order to avoid having to do the cost
calculation multiple times. I'm having some trouble understanding how
this is supposed to work as the IndexPlan interface doesn't seem to
have the ability to store a reference to the specific index which was
calculated as the cheapest. And looking at OrderedPropertyIndex, it
seems to have the same problem as in OAK-1894, i.e. the first indexed
property will be used regardless of which property has the lowest
cost.

I would expect that IndexPlan had some reference back to the
PropertyRestriction.

Regards,
Justin



[1] https://issues.apache.org/jira/browse/OAK-1894

Re: How to actually use IndexPlan to store the index details?

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi,
In the "advanced" patch attached to OAK-1894
(https://issues.apache.org/jira/secure/attachment/12650790/OAK-1894-advanced.diff),
I added a new method to IndexPlan which allows a PropertyDescription
to be attached to the plan. With that patch, PropertyIndex reads the
description out later (in query() and getPlanDescription()) to
determine how to execute that query.

WDYT?

Regards,
Justin

On Mon, Jun 16, 2014 at 5:04 PM, Justin Edelson
<ju...@justinedelson.com> wrote:
> Hi,
> As part of OAK-1894[1], I was looking into converting PropertyIndex to
> an AdvancedQueryIndex in order to avoid having to do the cost
> calculation multiple times. I'm having some trouble understanding how
> this is supposed to work as the IndexPlan interface doesn't seem to
> have the ability to store a reference to the specific index which was
> calculated as the cheapest. And looking at OrderedPropertyIndex, it
> seems to have the same problem as in OAK-1894, i.e. the first indexed
> property will be used regardless of which property has the lowest
> cost.
>
> I would expect that IndexPlan had some reference back to the
> PropertyRestriction.
>
> Regards,
> Justin
>
>
>
> [1] https://issues.apache.org/jira/browse/OAK-1894