[ 
https://issues.apache.org/jira/browse/OAK-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716403#comment-14716403
 ] 

Thomas Mueller commented on OAK-3263:
-------------------------------------

A few remarks:

{noformat}
if (excludedPaths.length > 0 && path == null || "/".equals(path)) {
{noformat}

I would add explicit brackets here (if only for me - I always forget if && or 
|| are evaluated first)

{noformat}
        if (pathFilterResult != PathFilter.Result.INCLUDE) {
            checkUniquenessConstraints();
            return;
        }
{noformat}

This looks a bit weird, but now I understand why checkUniquenessConstraints is 
called: it needs to be called in every case. To make that clear, and to avoid 
problem in the future (in case something needs to be done in all cases in 
addition to "checkUniquenessConstraints"),  I would probably move "// apply the 
type restrictions..." and "// if any changes were detected" also to a new 
method (same as for checkUniquenessConstraints), and then make "leave" call 
those methods.

{noformat}
        if (filterResult != PathFilter.Result.EXCLUDE) {
            return getChildIndexEditor(this, name, filterResult);
        }
        return null;
{noformat}

I would switch the logic here ((if filter == INCLUDE) return null), but then, 
it looks wrong to me... Is it really correct?

... not yet done ...

> Support including and excluding paths for PropertyIndex
> -------------------------------------------------------
>
>                 Key: OAK-3263
>                 URL: https://issues.apache.org/jira/browse/OAK-3263
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Chetan Mehrotra
>            Assignee: Manfred Baedke
>              Labels: performance
>             Fix For: 1.3.6
>
>         Attachments: OAK-3263-prelimary.patch, OAK-3263-v2.patch, 
> OAK-3263.patch
>
>
> As part of OAK-2599 support for excluding and including paths were added to 
> Lucene index. It would be good to have such a support enabled for 
> PropertyIndexe also



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to