XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0.1
    • Fix Version/s: None
    • Component/s: config-api, highlighter
    • Labels:
      None
    • Environment:

      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":

      {"Email":["<em>roger2</em>"]}

      ,"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":

      { "hl.fragsize":100 }

      },
      "regex":{
      "name":"regex",
      "class":"solr.highlight.RegexFragmenter",
      "defaults":{
      "hl.fragsize":70,
      "hl.regex.slop":0.5,
      "hl.regex.pattern":"[-\\w ,/\\n\\\"']

      {20,200}

      "
      }
      },
      "html":[
      {
      "default":"true",
      "name":"html",
      "class":"solr.highlight.HtmlFormatter",
      "defaults":

      { "hl.simple.pre":"pre-", "hl.simple.post":"-post" }

      },

      { "name":"html", "class":"solr.highlight.HtmlEncoder" }

      ],
      "simple":

      { "name":"simple", "class":"solr.highlight.SimpleFragListBuilder" }

      ,
      "single":

      { "name":"single", "class":"solr.highlight.SingleFragListBuilder" }

      ,
      "weighted":

      { "default":"true", "name":"weighted", "class":"solr.highlight.WeightedFragListBuilder" }

      ,
      "default":[

      { "default":"true", "name":"default", "class":"solr.highlight.ScoreOrderFragmentsBuilder" }

      ,
      {
      "default":"true",
      "name":"default",
      "class":"solr.highlight.SimpleBoundaryScanner",
      "defaults":

      { "hl.bs.maxScan":"10", "hl.bs.chars":".,!? \t\n\r" }

      }
      ],
      "colored":{
      "name":"colored",
      "class":"solr.highlight.ScoreOrderFragmentsBuilder",
      "defaults":

      { "hl.tag.pre":"pre-", "hl.tag.post":"-post" }

      },
      "breakIterator":{
      "name":"breakIterator",
      "class":"solr.highlight.BreakIteratorBoundaryScanner",
      "defaults":

      { "hl.bs.type":"WORD", "hl.bs.language":"en", "hl.bs.country":"US" }

      }
      }
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexandre.drouin Alex D
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: