Nuno Santos created OAK-10589:
---------------------------------

             Summary: Improve regex path filtering to also handle cases where 
excludedPaths are defined
                 Key: OAK-10589
                 URL: https://issues.apache.org/jira/browse/OAK-10589
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: indexing
            Reporter: Nuno Santos


Currently, we apply regex path filtering in the following case:
 * *includedPaths is non empty and excludedPaths is empty* - use a filter on 
the Mongo query with every includedPath. 

But we can apply path filtering on Mongo in more situations:
 * *{{includedPaths}} empty, {{excludedPaths}} non-empty* - This is the reverse 
situation of what we currently support, so we can define a Mongo filter with 
the list of {{excludedPaths}} and negate it.
 * *both includedPaths and excludedPaths  are non-empty* - In this case we can 
simply ignore the excluded paths and download all included paths. If an 
excluded path is outside an included path, it will not be downloaded because it 
will not match the included path filters. If an excluded path is a descendant 
of an included path, it will be downloaded from Mongo but filtered in the 
transform stage before being written to the FlatFileStore.
 * *includePaths and excludedPaths are both empty* - In this case we fall back 
to downloading everything.



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

Reply via email to