How should the category filter on the documents traverse the child categories to return all documents from parent and children.
Currently it will only do one layer of children
I think if we need to query categories recursively, we should either use something like MPTT, or cache the parents of each category in an ArrayField. Recursively iterating in a query is a bad idea performance-wise.
Since we didn't have positive-only experience with MPTT, I would suggest adding a all_parents = ArrayField(CharField()) to the category model, add a bit of code to keep them updated, and the query basically becomes all_parents__contains=my_category_slug
Originally posted by @winged in #365 (comment)
How should the category filter on the documents traverse the child categories to return all documents from parent and children.
Currently it will only do one layer of children
Originally posted by @winged in #365 (comment)