fix respectPermissionRoot logic in search indexing