nfsantos opened a new pull request, #1254:
URL: https://github.com/apache/jackrabbit-oak/pull/1254
The includedPaths property of an index definition should be an array of
strings. But a common mistake made by users is to define it as a String when it
has a single element. That is, instead of:
```
"includedPaths": [ "/a/b"] ,
```
it is defined as:
```
"includedPaths": "/a/b",
```
If `includedPaths` is defined as a String, the indexing job would ignore its
value and default to download the full node store and creates an FFS containing
everything (except hidden paths). This will slow down significantly the
indexing job, as it will negate any benefits from using regex filtering. And
even if regex filtering is not enabled or cannot be used, using `/` as
includedPaths will also result in the FFS containing more nodes than it should,
which will once again slow down the indexing job.
The same is true for `excludedPaths`, but in this case the default is empty,
so it will ignore the value of this property and will not exclude anything.
This may in fact lead to parts of the node store being indexed that should not
be indexed.
This PR makes the logic that reads the `includedPaths` and `excludedPaths`
properties more lenient, by treating Strings as one-element arrays and issuing
a warning with a suggested fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]