Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The way you're making highlighting seems good, but your solrconfig.xml looks a bit messy. Unfortunately the example you took uses basically all the available options, and I guess you don't need them. Unless you need something different from the default, I'd start commenting out all your highlighting configuration, as well as your default parameters. Then I'd play around with the url parameters you need, just a couple to start: hl=on and hl.fl=title. Once you've found the right parameters you can configure them as default.</p> <p>That said, given your title fieldType I suspect it isn't tokenized, unless you changed the default string type definition. In that case your query wouldn't match the title field, that's why you don't get highlighting on it. Are you maybe using edismax (or dismax)? If yes, what is your qf parameter? Is it possible that the toyota term is on another field that matches your query? If you're using edismax you can try searching for q=title:toyota ans see if you get results. </p> <p>You can also check where is your match enabling <strong>debugQuery=on</strong> and checking the debug output.</p> <p><strong>UPDATE</strong><br> I saw you changed the title fieldType to <code>text_general</code>, but this doesn't change anything because that type isn't tokenized on whitespaces. You haven't told yet what query parser you're using, anyway if I'm right you should use <code>WhitespaceTokenizerFactory</code> instead of the <code>StandardTokenizerFactory</code>:</p> <pre><code>&lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt; </code></pre> <p>After that, remember to reindex all your data, otherwise you won't see any change. Basically, if you index something like <code>toyota whatever</code> without tokenizing on whitespaces, you won't get any result searching for <code>toyota</code>, and you won't even have <code>toyota</code> highlighted on that field because it doesn't match. My assumption is that you're using <code>dismax</code> or <code>edismax</code> query parser and searching on more than one field, and some of them but not title match your search, that's why you'd get results but not highlighting on <code>title</code>, the only field you selected for highlighting. Can you post the results you get searching for <code>toyota</code>? Is the <code>toyota</code> term on some other fields than <code>title</code>?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload