You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robin Woods <wo...@gmail.com> on 2018/08/02 09:59:07 UTC

UnifiedHighlighter not respecting hl.fragsize?

Hi,

I'm trying to use UnifiedHighlighter with Solr 7.4.0 and it seem's it's not
respecting the hl.fragsize param?

I'm expecting the snippet length shouldn't be more than the hl.fragsize
value, is that correct?

query time params:
"hl": "on",
"hl.method": "unified"
"hl.offsetSource": "POSTINGS"
"hl.fragsize": "50",
"hl.snippets": "1",
"hl.q":"+funny+comic+characters",
"hl.fl":"contents",
"q": "id:1234",

Field definitions are

<field name="contents" type="myContent"  indexed="true"  stored="true"
 multiValued="true" required="false"
storeOffsetsWithPositions="true"/>

<fieldType name="myContent" class="solr.TextField" positionIncrementGap="0">
  <analyzer type="index">
    <charFilter class="solr.PatternReplaceCharFilterFactory"
pattern="[\'\u2019]" replacement=""/>
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.WordDelimiterFilterFactory"
            generateWordParts="1"
            generateNumberParts="1"
            catenateWords="0"
            catenateNumbers="0"
            catenateAll="0"
            preserveOriginal="0"
            splitOnCaseChange="1"
            splitOnNumerics="1"
            stemEnglishPossessive="0"
            types="text_delimiters.txt"
    />
    <filter class="solr.ASCIIFoldingFilterFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
expand="true"/>
    <filter class="solr.SnowballPorterFilterFactory" language="English"/>
    <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.ASCIIFoldingFilterFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.SnowballPorterFilterFactory" language="English"/>
  </analyzer>
  <similarity class="solr.BM25SimilarityFactory">
    <float name="k1">1.2</float>
    <float name="b">0.0</float>
  </similarity>
</fieldType>

What am I missing here?

Thanks