Use Document order traversal for reindexing performed on DocumentNodeStore setups
Filter NodeDocument via path predicated backed by indexers
@@ -90,10 +90,16 @@ public class NodeStateEntryTraverser implements Iterable<NodeStateEntry>, Closea
@SuppressWarnings("Guava")
private Iterable<NodeStateEntry> getIncludedDocs() {
return FluentIterable.from(getDocsFilteredByPath())
- .filter(doc -> !doc.isSplitDocument() && !NodeStateUtils.isHiddenPath(doc.getPath()))
+ .filter(doc -> includeDoc(doc))
.transformAndConcat(doc -> getEntries(doc));
}
+ private boolean includeDoc(NodeDocument doc) {
+ return !doc.isSplitDocument()
+ && !NodeStateUtils.isHiddenPath(doc.getPath())
+ && pathPredicate.test(doc.getPath());
+ }
+
@SuppressWarnings("StaticPseudoFunctionalStyleMethod")
private Iterable<NodeStateEntry> getEntries(NodeDocument doc) {
String path = doc.getPath();
