title: Solr does not highlight some words
body: <p>I configured solr 4.10 (also 5.3) with <a href="https://wiki.apache.org/solr/HighlightingParameters">highlighting functionality</a>. It works fine with most of the words, however I found some words which "<strong>does not</strong>" allow highlightings, that is, solr returns the required docs, but does not highlights some of them.</p>
  
  <p>What can cause such effect?</p>
  
  <p><strong>solrconfig.xml</strong></p>
  
  <pre><code> &lt;requestHandler name="/select" class="solr.SearchHandler"&gt;
   &lt;lst name="defaults"&gt;
     &lt;str name="wt"&gt;json&lt;/str&gt;
     &lt;str name="indent"&gt;true&lt;/str&gt;
     &lt;str name="defType"&gt;edismax&lt;/str&gt;
     &lt;str name="bf"&gt;product(concount)&lt;/str&gt;
     &lt;str name="df"&gt;text bio text_syn text_syn_other&lt;/str&gt;
     &lt;str name="qf"&gt;
      text^25 bio^16 text_syn^8 text_syn_other^3
     &lt;/str&gt;
     &lt;str name="hl"&gt;on&lt;/str&gt;
     &lt;str name="hl.fl"&gt;text bio text_syn text_syn_other&lt;/str&gt;
     &lt;str name="hl.preserveMulti"&gt;true&lt;/str&gt;
     &lt;str name="hl.encoder"&gt;html&lt;/str&gt;
     &lt;str name="f.text.hl.fragsize"&gt;100&lt;/str&gt;
     &lt;str name="hl.snippets"&gt;20&lt;/str&gt;
     &lt;arr name="components"&gt;
       &lt;str&gt;highlight&lt;/str&gt;
     &lt;/arr&gt;
   &lt;/lst&gt;
  </code></pre>
  
  <p><strong>schema.xml</strong></p>
  
  <pre><code>    &lt;fieldType name="text_en" class="solr.TextField" positionIncrementGap="100"&gt;
    &lt;analyzer type="index"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
      &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms_abbr.txt" ignoreCase="true" expand="false"/&gt;
    &lt;/analyzer&gt;
    &lt;analyzer type="query"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  
  &lt;fieldType name="text_en_syn" class="solr.TextField" positionIncrementGap="100"&gt;
    &lt;analyzer type="index"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
      &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/&gt;
    &lt;/analyzer&gt;
    &lt;analyzer type="query"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  
  &lt;fieldType name="text_en_syn_other" class="solr.TextField" positionIncrementGap="100"&gt;
    &lt;analyzer type="index"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
      &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms_other.txt" ignoreCase="true" expand="false"/&gt;
    &lt;/analyzer&gt;
    &lt;analyzer type="query"&gt;
      &lt;tokenizer class="solr.PatternTokenizerFactory" pattern="[\s\n,/\\]" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  
  &lt;field name="text" type="text_en" indexed="true" stored="true" multiValued="false" /&gt;
  &lt;field name="text_syn" type="text_en_syn" indexed="true" stored="false" multiValued="true" /&gt;
  &lt;field name="text_syn_other" type="text_en_syn_other" indexed="true" stored="false" multiValued="true" /&gt;
  
  &lt;field name="text_exact" type="string" indexed="true" stored="false" multiValued="false" /&gt;
  
  &lt;field name="bio" type="text_en" indexed="true" stored="true" multiValued="false" /&gt;
  
  &lt;field name="bio_exact" type="string" indexed="true" stored="false" multiValued="false" /&gt;
  
  &lt;field name="concount" type="long" indexed="true" stored="true" multiValued="false" /&gt;
  
  &lt;field name="concount_exact" type="long" indexed="true" stored="false" multiValued="false" /&gt;
  
  &lt;copyField source="text" dest="text_syn"/&gt;
  &lt;copyField source="bio" dest="text_syn"/&gt;
  &lt;copyField source="text" dest="text_syn_other"/&gt;
  &lt;copyField source="bio" dest="text_syn_other"/&gt;
  </code></pre>
  
  <p>For the query <code>http://localhost:8983/solr/select?q=senior</code> I got docs containing the word <code>senior</code>, but in highlighting section of solr response that word is not highlighted.</p>
  
  <hr>
  
  <p><strong>UPDATE 1:</strong>
  I find out that I have the word <code>senior</code> in my <code>synonyms_abbr.txt</code> file, the line <code>senior,lead</code>. When I commented that line or replaced the places of words, <code>lead,senior</code>, surprisingly the word <code>senior</code> started geting highlighting. Any ideas ?</p>
  
  <hr>
  
  <p><strong>UPDATE 2:</strong>
  Words from <code>synonyms.txt</code> and <code>synonyms_other.txt</code> are getting highlighting normally, but words from <code>synonyms_abbr.txt</code> behave strangely as follows. For example, I have the line <code>lead,head,senior</code> in <code>synonyms_abbr.txt</code> then</p>
  
  <ul>
  <li>the queries <code>http://localhost:8983/solr/select?q=senior</code> and <code>http://localhost:8983/solr/select?q=head</code> does not highlight any word,</li>
  <li>the query <code>http://localhost:8983/solr/select?q=lead</code> highlights not only the word <code>lead</code>, but also <code>head</code> and <code>senior</code>.</li>
  </ul>