Hi,

>>>It's more than access control. The query engine needs to double-check
>>>the constraints of the query for each matching path before passing
>>>that node to the client (see the constraint.evaluate() call in [1]). I
>>>don't see any easy way to avoid that step without major refactoring.
>>
>> If there is no other constraint, then no additional checks are needed.
>
>That's not correct. For example if I query for a value with more than
>100 characters, the PropertyIndex may return paths that actually won't
>match the query.

Sorry, sure, the condition is verified again. But this might be an
in-memory operation. The index may return the property value for each
entry as part of running the query (QueryIndex - Cursor - IndexRow). I
think the index implementations don't do that currently, so in reality the
node is always loaded with the current version of Oak, that's true.
Javadoc of Cursor.next(): "The index should return a row with those
properties that are stored in the index itself, so that the query engine
doesn't have to load the whole row / node unnecessarily."

Regards,
Thomas



Reply via email to