What happens with the index when deleting data in InfluxDB?

In MongoDB, deleting data does not clear up the index. If I were to write a service that implements a retention policy for MongoDB, the index would just keep growing over time and queries become slower and slower, even though the database size stays the same. Source: https://www.mongodb.com/docs/v4.4/tutorial/remove-documents/#indexes, also see reindex: https://www.mongodb.com/docs/manual/reference/command/reIndex/

Is InfluxDB doing that differently? Is there any difference in how the index is affected between retention and manual DELETE queries?