Unexpected child docs can occur if parents have been deleted, but children remain, which can cause them to be adopted by the adjacent record in the index. Is there any chance of a delete by query having benn used on the in the 9.x? (should only ever delete by id with block/join indexing)
The block/join feature relies on consecutive children between parents (which is why it is fast to query and why you have to re-index all children if any or the parent are updated). Basically it marches through children till it finds a parent, and thus all adjacent children are siblings. Delete by ID is aware of this and cleans up children when a parent is deleted, but delete by query does not have this ability. With sufficient care, one can construct a query delete that does the right thing, but it's difficult, error prone, and not recommended... I haven't looked into exactly what that explain line means by range, but if it means lucene docid ranges the 0 to 1696831 looks a bit dodgy. -Gus
