[
https://issues.apache.org/jira/browse/SOLR-1696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796167#action_12796167
]
Noble Paul commented on SOLR-1696:
----------------------------------
The new syntax can be as follows
{code:xml}
<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>
</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"><![CDATA[<em>]]></str>
<str name="hl.simple.post"><![CDATA[</em>]]></str>
</lst>
</formatter>
</highlighting>
</searchComponent>
{code}
This way SolrCore can be totally agnostic of highlighter
> Deprecate old <highlighting> syntax and move configuration to
> HighlightComponent
> --------------------------------------------------------------------------------
>
> Key: SOLR-1696
> URL: https://issues.apache.org/jira/browse/SOLR-1696
> 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 there.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.