hello, mike adviser me last time to use: >This is done by the fragmenting stage of highlighting. Solr (trunk) >ships with a fragmenter that looks for sentence-like snippets using >regular expressions: try hl.fragmenter=regex (see config in >solrconfig.xml). the prolem is I wasn't able either to do that or spécifie the fragsize from solrconfig.xml i think it is due to the version of solr I use and what classe and package I spécifie ie: I put this in solrconfig.xml
<highlighting> <!-- Configure the standard fragmenter --> − <!-- This could most likely be commented out in the "default" case --> − <fragmenter name="gap" class="org.apache.solr.util.GapFragmenter" default="true"> − <lst name="defaults"> <int name="hl.fragsize">400</int> </lst> </fragmenter> − <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) --> − <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter"> − <lst name="defaults"> − <!-- slightly smaller fragsizes work better because of slop --> <int name="hl.fragsize">70</int> <!-- allow 50% slop on fragment sizes --> <float name="hl.regex.slop">0.5</float> <!-- a basic sentence pattern --> <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> </lst> </fragmenter> <!-- Configure the standard formatter --> − <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true"> − <lst name="defaults"> <str name="hl.simple.pre"></str> <str name="hl.simple.post"></str> </lst> </formatter> </highlighting> so either using <fragmenter name="gap" class="org.apache.solr.util.GapFragmenter" default="true"> org.apache.solr.util.GapFragmenter specifique to solr1.2 or <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true"> it doesn't work solr still use the default value fragsize=100. also I am not able to spécifie regex fragmenter due to this probleme of version I suppose or the way I am declaring <highlighting> ......</highlighting> because both of: <fragmenter name="gap" class="org.apache.solr.util.GapFragmenter" default="true"> and <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true"> still use fragsize=100 but i am using <int name="hl.fragsize">400</int> as shown above. thank you. -- View this message in context: http://www.nabble.com/Snipets-Solr-nutch-tp16537216p16656960.html Sent from the Solr - User mailing list archive at Nabble.com.