A custom analyzer for the string type that sets that option is one way to achieve what you’re after.

I recommend, however, doing autocomplete/suggest using the indexing and query techniques shown here: Relevant As-You-Type Suggestions Search Solution | MongoDB