How to exclude records in between two records in elasticsearch?

I don't think there is an easy way to do that.
I believe you need to think about your model in a different way and basically solve that problem at index time instead.