According to the documentation of the search endpoint for ancestor_folder_ids Search results will also include items within any subfolders of those ancestor folders.
In one case I'm observing that this does not happen.
There's a file with extension .abc in the folder "0" / "127776557xxx" / "197135556yyy" / "134100556zzz"
Calling search with query = "abc" and ancestor_folder_ids = { "134100556zzz" } (immediate parent folder) will return the file.
Calling search with query = "abc" and ancestor_folder_ids = { "197135556yyy" } (parent folder of immediate parent folder) does NOT return the file.
How is this possible?