title: Getting terms matched in a document when searching using a wildcard search
body: <p>I am looking for a way to find the terms that matched in the document using waldcard search in Lucene. I used the explainer to try and find the terms but this failed. A portion of the relevant code is below.</p>
  
  <pre><code>ScoreDoc[] myHits = myTopDocs.scoreDocs;
  int hitsCount = myHits.Length;
  for (int myCounter = 0; myCounter &lt; hitsCount; myCounter++)
  {
      Document doc = searcher.Doc(myHits[myCounter].doc);
      Explanation explanation = searcher.Explain(myQuery, myCounter);
      string myExplanation = explanation.ToString();
      ...
  </code></pre>
  
  <p>When I do a search on say micro*, documents are found and it enter the loop but myExplanation contains NON-MATCH and no other information.</p>
  
  <p>How do I get the term that was found in this document ?</p>
  
  <p>Any help would be most appreciated.</p>
  
  <p>Regards</p>