Try asking your question on the “Solr user” email list – this is the Lucene user list!
-- Jack Krupansky From: Adrien RUFFIE Sent: Monday, July 01, 2013 4:36 AM To: [email protected] Subject: highlighting component to searchComponent Hello all I had the following configuration in my solrconfig.xml : <!-- <highlighting> --> <!-- <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true"> --> <!-- <lst name="defaults"> --> <!-- <int name="hl.fragsize">100</int> --> <!-- </lst> --> <!-- </fragmenter> --> <!-- <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter"> --> <!-- <lst name="defaults"> --> <!-- <int name="hl.fragsize">70</int> --> <!-- <float name="hl.regex.slop">0.5</float> --> <!-- <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> --> <!-- </lst> --> <!-- </fragmenter> --> <!-- <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true"> --> <!-- <lst name="defaults"> --> <!-- <str name="hl.simple.pre"><![CDATA[]]></str> --> <!-- <str name="hl.simple.post"><![CDATA[]]></str> --> <!-- </lst> --> <!-- </formatter> --> <!-- </highlighting> --> But when I start my webapp the following message appears: WARNING: Deprecated syntax found. <highlighting/> should move to <searchComponent/> So I have tried to convert my highlighting to searchComponent with following configuration: <searchComponent class="solr.HighlightComponent" name="highlight"> <highlighting> <fragmentsBuilder name="gap" class="solr.highlight.GapFragmenter" default="true"> <lst name="defaults"> <str name="hl.tag.pre"><![CDATA[<span class="highlight">]]></str> <str name="hl.tag.post"><![CDATA[</span>]]></str> </lst> </fragmentsBuilder> <fragmentsBuilder name="regex" class="solr.highlight.RegexFragmenter" default="true"> <lst name="defaults"> <int name="hl.fragsize">70</int> <float name="hl.regex.slop">0.5</float> <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> </lst> </fragmentsBuilder> <formatter name="html" class="solr.highlight.HtmlFormatter" default="true"> <lst name="defaults"> <str name="hl.simple.pre"><![CDATA[<span class="highlight">]]></str> <str name="hl.simple.post"><![CDATA[</span>]]></str> </lst> </formatter> </highlighting> </searchComponent> But now following error appears … do you know the problem and what is the correct class implementation ? GRAVE: org.apache.solr.common.SolrException: Error Instantiating SolrFragmentsBuilder, solr.highlight.GapFragmenter is not a org.apache.solr.highlight.SolrFragmentsBuilder if you know the right way to do this conversion, I'm interested Best regards, Bien cordialement, Adrien RUFFIE Ingénieur R&D 40, rue du Village d’Entreprises 31670 Labège www.e-deal.com LD : +33 1 73 03 29 50 Std : +33 1 73 03 29 80 Fax : +33 1 73 01 69 77 [email protected] E-DEAL soutient le Pacte Mondial de l'ONU
