Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
6.0.1
-
None
-
None
-
SolrCloud on Windows with ZooKeeper 3.4.8
Description
The configuration of a highlight component is not used when the component is added using the Config API. I used the following steps to reproduce the issue:
1) Add the highlight component on a request handler:
<str name="hl">on</str>
<str name="hl.fl">Email</str>
<str name="f.name.hl.fragsize">0</str>
2) Execute a search using the request handler. I can see the default configuration of the component returned in the results:
"highlighting":{"a":
,"b":
{ "Email":"<em>roger</em>"]}3) Add the highlight component using the Config API (see JSON below) & reload collection. No errors were returned by Solr when adding the component.
4) Execute the same search as step2 and we can see the format of the highlight is still using "em" instead of the new format from the Config API.
Content of the post to the Config API:
(Curl in a Windows' command prompt has some issues parsing the JSON so I used Fiddler to send it to Solr)
{
"add-searchcomponent":{
"name":"highlight",
"class":"solr.HighlightComponent",
"":{
"gap":{
"default":"true",
"name":"gap",
"class":"solr.highlight.GapFragmenter",
"defaults":
},
"regex":{
"name":"regex",
"class":"solr.highlight.RegexFragmenter",
"defaults":{
"hl.fragsize":70,
"hl.regex.slop":0.5,
"hl.regex.pattern":"[-\\w ,/\\n\\\"']
"
}
},
"html":[
{
"default":"true",
"name":"html",
"class":"solr.highlight.HtmlFormatter",
"defaults":
},
{ "name":"html", "class":"solr.highlight.HtmlEncoder" } ],
"simple":
,
"single":
,
"weighted":
,
"default":[
,
{
"default":"true",
"name":"default",
"class":"solr.highlight.SimpleBoundaryScanner",
"defaults":
}
],
"colored":{
"name":"colored",
"class":"solr.highlight.ScoreOrderFragmentsBuilder",
"defaults":
},
"breakIterator":{
"name":"breakIterator",
"class":"solr.highlight.BreakIteratorBoundaryScanner",
"defaults":
}
}
}
}