Added: support for new indexer features

Please see the whole explanation in https://github.com/cozy/cozy-data-indexer/pull/12
You could write two sub functions with explicit names and call it both in the same loop walking.