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
