I have two sets of page hierarchies that look like this:
If I call the REST API wiki/rest/api/content/R1/descendant/page, or if I execute a CQL search with ancestor=R1 AND type IN ( page ) I get the pages One, Two, and Three back as expected.
If I move R2 to be an immediate child of R1, the same REST API call returns all expected pages. However, the same SQL search returns pages One, Two, Three, and R2; missing are Four, Five and Six.
Am I searching incorrectly, or do I have incorrect expectations? Or should this be considered a bug in the CQL search implementation?