title: How to handle auto completion on multi word text?
body: <p>My input text is a multiword english text and I have the requirement to implement a autocompletion feature for that text.</p>
  
  <p>I initially looked at search <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html" rel="nofollow noreferrer">completion suggesters</a> only to figure out that those can only match the first characters of the input. This is fine for auto completion of product names or address but not very useful when requiring a auto completion on any word in the input text.</p>
  
  <p>After that I setup an <strong>edge_ngram</strong> analyzer and query to locate those documents which contain the input string. That works just fine but I don't know how to use this information to provide options for my auto completion.</p>
  
  <p>I could use a <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html" rel="nofollow noreferrer">highlighter</a> in order to show the words which match the query. That data could in turn be used to setup a list of options. This solution seems rather hacky and not very elegant and I wonder how this problem is usually solved?</p>
  
  <p>I'm unfortunately not able to maintain another field which could include the auto completion options for the documents.</p>