title: Lucene get list of matched keywords
body: <p>I have a Java (lucene 4) based application and a set of keywords fed into the application as a search query  (the terms may include more than one words, eg it can be: “memory”, “old house”, “European Union law”, etc).</p>
  
  <p>I need a way to get the list of matched keywords out of an indexed document and possibly also get keyword positions in the document (also for the multi-word keywords).
  I tried with the lucene highlight package but I need to get only the keywords without any surrounding portion of text. It also returns multi-word keywords in separate fragments.</p>
  
  <p>I would greatly appreciate any help.</p>