lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Lin Edwin Yeo <edwinye...@gmail.com>
Subject Highlighting tag problem
Date Thu, 03 Dec 2015 10:07:40 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message