Searching terms in Inverted index

Is there a way in Elasticsearch in which I can search all the terms in the inverted index? So say, if I want to find all the terms (Not the documents..) starting with au and ending with o.

I know that there is a _termvector API, but I need to specify a document id there and it doesn't allow me to search.

My use case is, I want to see how many terms are there in the inverted index matching a perticular REGEX pattern. I have also thought about using aggregation, but aggregation will be a heavy query to first search all docs and then compute terms aagregation on it...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.