title: Solr: Highlighting special characters (eg. ')
body: <p>Been searching high and low for a couple of days, but the various posts I found regarding highlighting didn't cover this specific issue.</p>
  
  <p>We're trying to get special characters like ' highlighted in data like "Assassin's Creed Revelations" when searching for <strong>"assassin's cre"</strong></p>
  
  <p>The returned highlight is: <strong>Assassin</strong>'s <strong>Cre</strong>ed Revelations. The "'s" is not highlighed.</p>
  
  <p>We search like this:</p>
  
  <pre><code>        $parts    = explode(' ', $query);
          $response = $solr-&gt;search(
              '+"' . $query . '" OR "'. $parts[0] .'"', 
              0, 10, 
              array(
                  'sort'      =&gt; 'score desc', 
                  'hl'        =&gt; 'on', 
                  'hl.fl'     =&gt; 'qsearch',
                  'fl'        =&gt; '*,score', 
                  'defType'   =&gt; 'dismax',
                  'qf'        =&gt; 'qsearch^2 title_start^5',
                  'bf'        =&gt; 'product(mostsold)^25'
              )
          );
  </code></pre>
  
  <p>Image to illustrate what's returned:</p>
  
  <p><img src="https://i.stack.imgur.com/15G0u.png" alt="enter image description here"></p>
  
  <p>Ideas, more info needed?</p>