lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ao...@swissonline.ch>
Subject highlighting displays to much
Date Fri, 11 Apr 2014 10:16:24 GMT
i am using solr 4.3.1 and want to highlight complete sentences if possible or at least not
cut up words. it it finds something the hole field is displayed instead of only 180 chars

the field is:
<fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<field name="plain_text" type="text_de" indexed="true" stored="true" default="" />	

solrconfig setting for highlighting:
       <str name="hl">true</str>
       <str name="hl.fl">plain_text title description</str>
       <str name="hl.simple.pre">&lt;b&gt;</str>
       <str name="hl.simple.post">&lt;/b&gt;</str>
       <str name="hl.snippets">5</str>
	   <str name="hl.fragsize">180</str>
	   <str name="hl.fragmenter">regex</str>
	   <str name="hl.regex.slop">0.2</str>
	   <str name="hl.regex.pattern">\w[^\.!\?]{20,160}</str>

Mime
View raw message