lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <>
Subject [jira] Commented: (SOLR-1696) Deprecate old <highlighting> syntax and move configuration to HighlightComponent
Date Mon, 04 Jan 2010 12:35:54 GMT


Noble Paul commented on SOLR-1696:

The new syntax can be as follows
<searchComponent class="solr.HighLightComponent">
  <highlighting class="DefaultSolrHighlighter">
   <!-- Configure the standard fragmenter -->
   <!-- This could most likely be commented out in the "default" case -->
   <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
    <lst name="defaults">
     <int name="hl.fragsize">100</int>

   <!-- 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>

   <!-- Configure the standard formatter -->
   <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
    <lst name="defaults">
     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
     <str name=""><![CDATA[</em>]]></str>

This way SolrCore can be totally agnostic of highlighter 

> Deprecate old <highlighting> syntax and move configuration to HighlightComponent
> --------------------------------------------------------------------------------
>                 Key: SOLR-1696
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: highlighter
>            Reporter: Noble Paul
>             Fix For: 1.5
> There is no reason why we should have a custom syntax for highlighter configuration.
> It can be treated like any other SearchComponent and all the configuration can go in

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message