Theia-Madalin Vlad created OAK-12431:
----------------------------------------

             Summary: Fail reindexing of a fulltext index definition that has 
no indexRules
                 Key: OAK-12431
                 URL: https://issues.apache.org/jira/browse/OAK-12431
             Project: Jackrabbit Oak
          Issue Type: Improvement
            Reporter: Theia-Madalin Vlad


Sometimes indexing only gets part of the index definition: the index node 
itself, without any of its child nodes. So far this seems to be caused by 
content package filters like these:

{noformat}
<workspaceFilter version="1.0">
    <filter root="/oak:index">
        <include pattern="/oak:index/myIndex-1"/>
    </filter>
</workspaceFilter>
{noformat}

or

{noformat}
<filter root="/oak:index">
    <include pattern="/oak:index/myIndex-1-custom-1(/.*)?"/>
    <include pattern="/oak:index/otherIndex-2?"/>
</filter>
{noformat}

The index definition then has no child nodes, so it has no "indexRules" child 
node either. This happens even if the .content.xml file does have child nodes.

Currently, indexing continues anyway, and Oak adds an "indexRules" node with a 
very broad specification: index all nodes and all property types.

We should fail indexing in this case. It is better to fail than to index 
incorrectly.

The error message should say something like: "One possible root cause is that 
the filter in the index definition is on "oak:index", and there is an "include" 
pattern." It should point clearly to the root cause.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to