One of the fields in my index is a version number, e.g. "3.0.7", stored as a keyword. I'd like to do aggregations using only part of the version. For example, I'd like a count of the number of documents for each major version (1.x, 2.x, etc).
I could create separate fields:
But I'm wondering if there's another way to do this.