bq: So the fields in the fl will affect the fields that will be highlighted?
No. The pedantry was that one of the replies could be read as the fl specification affected what fields were _searched_. On Mon, Dec 7, 2015 at 2:43 PM, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > So the fields in the fl will affect the fields that will be highlighted? > > Isn't only those fields that are specified in hl.fl be highlighted? As I > found some fields that are not specified in hl.fl also got highlighted, but > since it is not specified in hl.fl, that field is not shown in the result > set, and the result set will show a record which doesn't have any highlight > in it. > > Regards, > Edwin > > > On 8 Dec 2015 2:30 am, "Erick Erickson" <erickerick...@gmail.com> wrote: >> >> Pedantry here: >> >> bq: Unless you override fl or hl.fl in url parameters you can get a hit in >> content_type, last_modified, url, or score and those fields will not get >> highlighted. >> >> In the main correct, but the phrasing makes it seem like the fl parameter >> has something to do with the fields _searched_, when it just >> specifies the fields _returned_. Perhaps you're thinking of qf in >> edismax? Or df?... >> >> It's spot on that the hl.fl fields are all that's highlighted and this is >> probably the issue the OP had. >> >> Best, >> Erick >> >> On Mon, Dec 7, 2015 at 9:22 AM, Scott Stults >> <sstu...@opensourceconnections.com> wrote: >> > I see. There appears to be a gap in what you can match on and what will > get >> > highlighted: >> > >> > <str name="fl">id, title, content_type, last_modified, url, score </str> >> > >> > <str name="hl.fl">id, title, content, author, tag</str> >> > >> > Unless you override fl or hl.fl in url parameters you can get a hit in >> > content_type, last_modified, url, or score and those fields will not get >> > highlighted. Try adding those fields to hl.fl. >> > >> > >> > k/r, >> > Scott >> > >> > On Fri, Dec 4, 2015 at 12:59 AM, Zheng Lin Edwin Yeo < > edwinye...@gmail.com> >> > wrote: >> > >> >> Hi Scott, >> >> >> >> No, what's describe in SOLR-8334 is the tag appearing at the result, > but at >> >> the wrong position. >> >> >> >> For this problem, the situation is that when I do a highlight query, > some >> >> of the results in the resultset does not contain the search word in > title, >> >> content_type, last_modified and url, as specified in my solrconfig.xml >> >> which I'm posted earlier on, and there is no <em> tag in those > results. So >> >> I'm not sure why those results are returned. >> >> >> >> Regards, >> >> Edwin >> >> >> >> >> >> On 4 December 2015 at 01:03, Scott Stults < >> >> sstu...@opensourceconnections.com >> >> > wrote: >> >> >> >> > Edwin, >> >> > >> >> > Is this related to what's described in SOLR-8334? >> >> > >> >> > >> >> > k/r, >> >> > Scott >> >> > >> >> > On Thu, Dec 3, 2015 at 5:07 AM, Zheng Lin Edwin Yeo < >> >> edwinye...@gmail.com> >> >> > wrote: >> >> > >> >> > > Hi, >> >> > > >> >> > > I'm using Solr 5.3.0. >> >> > > Would like to find out, during a search, 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? >> >> > > >> >> > > This is my highlighting request handler from solrconfig.xml. >> >> > > >> >> > > <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> >> >> > > >> >> > > >> >> > > This is my pipeline for the field. >> >> > > >> >> > > <fieldType name="text_chinese2" class="solr.TextField" >> >> > > positionIncrementGap="100"> >> >> > > >> >> > > <analyzer type="index"> >> >> > > >> >> > > <tokenizer >> >> class="analyzer.solr5.jieba.JiebaTokenizerFactory" >> >> > > segMode="SEARCH"/> >> >> > > >> >> > > <filter class="solr.CJKWidthFilterFactory"/> >> >> > > >> >> > > <filter class="solr.CJKBigramFilterFactory"/> >> >> > > >> >> > > <filter class="solr.StopFilterFactory" >> >> > > words="org/apache/lucene/analysis/cn/smart/stopwords.txt"/> >> >> > > >> >> > > <filter class="solr.StopFilterFactory" ignoreCase="true" >> >> > > words="stopwords.txt" /> >> >> > > >> >> > > <filter class="solr.WordDelimiterFilterFactory" >> >> > > generateWordParts="1" generateNumberParts="1" catenateWords="0" >> >> > > catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> >> >> > > >> >> > > <filter class="solr.SynonymFilterFactory" >> >> > > synonyms="synonyms.txt" ignoreCase="true" expand="false"/> >> >> > > >> >> > > <filter class="solr.KStemFilterFactory"/> >> >> > > >> >> > > <filter class="solr.EdgeNGramFilterFactory" > minGramSize="1" >> >> > > maxGramSize="15"/> >> >> > > >> >> > > </analyzer> >> >> > > >> >> > > <analyzer type="query"> >> >> > > >> >> > > <tokenizer >> >> class="analyzer.solr5.jieba.JiebaTokenizerFactory" >> >> > > segMode="SEARCH"/> >> >> > > >> >> > > <filter class="solr.CJKWidthFilterFactory"/> >> >> > > >> >> > > <filter class="solr.CJKBigramFilterFactory"/> >> >> > > >> >> > > <filter class="solr.StopFilterFactory" >> >> > > words="org/apache/lucene/analysis/cn/smart/stopwords.txt"/> >> >> > > >> >> > > <filter class="solr.StopFilterFactory" ignoreCase="true" >> >> > > words="stopwords.txt" /> >> >> > > >> >> > > <filter class="solr.WordDelimiterFilterFactory" >> >> > > generateWordParts="0" generateNumberParts="0" catenateWords="0" >> >> > > catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/> >> >> > > >> >> > > <filter class="solr.SynonymFilterFactory" >> >> > > synonyms="synonyms.txt" ignoreCase="true" expand="false"/> >> >> > > >> >> > > <filter class="solr.KStemFilterFactory"/> >> >> > > >> >> > > </analyzer> >> >> > > >> >> > > </fieldType> >> >> > > >> >> > > >> >> > > Regards, >> >> > > Edwin >> >> > > >> >> > >> >> > >> >> > >> >> > -- >> >> > Scott Stults | Founder & Solutions Architect | OpenSource > Connections, >> >> LLC >> >> > | 434.409.2780 >> >> > http://www.opensourceconnections.com >> >> > >> >> >> > >> > >> > >> > -- >> > Scott Stults | Founder & Solutions Architect | OpenSource Connections, > LLC >> > | 434.409.2780 >> > http://www.opensourceconnections.com