I found that it could be due to the EdgeNGramFilterFactory. This issue didn't happen if I did not apply the EdgeNGramFilterFactory filter for my fieldType.
But does anyone knows why using the EdgeNGramFilterFactory will cause this problem? Regards, Edwin On 7 October 2015 at 17:46, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > Hi, > > Has anyone face the problem of when using highlighting, sometimes there > are results which are returned, but there is no highlighting to the result > (ie: no <em> tag). > > I found that there is a match in another field which I did not include in > my hl.fl parameters when I do fl=*, but that same word acutally does appear > in content. > > Would like to find out, why sometimes there is a match in content, but it > is not highlighted (the word is not in the stopword list)? Did I make any > mistakes in my configuration? > > I've include my highlighting request handler from solrconfig.xml here. > > <requestHandler name="/highlight" class="solr.SearchHandler"> > <lst name="defaults"> > <str name="echoParams">explicit</str> > <int name="rows">10</int> > <str name="wt">json</str> > <str name="indent">true</str> > <str name="df">text</str> > <str name="fl">id, title, content_type, last_modified, url, score </str> > > <str name="hl">on</str> > <str name="hl.fl">id, title, content, author, tag</str> > <str name="hl.highlightMultiTerm">true</str> > <str name="hl.preserveMulti">true</str> > <str name="hl.encoder">html</str> > <str name="hl.fragsize">200</str> > > <str name="group">true</str> > <str name="group.field">signature</str> > <str name="group.main">true</str> > <str name="group.cache.percent">100</str> > </lst> > </requestHandler> > > > Regards, > Edwin >