Can Rollover API / ILM be used to keep only x days data in an index at any point of time

But usually delete by query isn't looked upon as an efficient solution.
@theuntergeek mentioned in the post What is the definitive way of only retaining 7 days of logs.