CMFCategory: Do not index any Base Category as a related document.
Without this change, "source/a/b" in non-strict mode indexes: (document.uid, source.uid, b.uid, 1) (document.uid, source.uid, a.uid, 0) (document.uid, source.uid, source.uid, 0) This last line does not contain anything which cannot be found by looking at the base category uid column, so it is wasting disk (and index) space, costing performance. But keep indexing a Base Category document if is it not the base category for considered relation. It is not clear whether stopping indexation at the first encountered Base Category document is intentional, or if recursion should only stop when reaching the base category of considered relation. With this change, "source/a/b" in non-strict mode indexes: (document.uid, source.uid, b.uid, 1) (document.uid, source.uid, a.uid, 0) removing the redundancy.
Showing