Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6365

specify appends, defaults, invariants outside of the component

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0, 6.0
    • None
    • None

    Description

      The components are configured in solrconfig.xml mostly for specifying these extra parameters. If we separate these out, we can avoid specifying the components altogether and make solrconfig much simpler. Eventually we want users to see all functions as paths instead of components and control these params from outside , through an API and persisted in ZK

      objectives :

      • define standard components implicitly and let users override some params only
      • reuse standard params across components
      • define multiple param sets and mix and match these params at request time

      example

      <!-- use json for all paths and _txt as the default search field-->
      <initParams name="global" path="/**">
        <lst name="defaults">
           <str name="wt">json</str>
           <str name="df">_txt</str>
        </lst>
      </initParams>
      

      other examples

      <initParams name="a" path="/dump3,/root/*,/root1/**">
          <lst name="defaults">
            <str name="a">A</str>
          </lst>
          <lst name="invariants">
            <str name="b">B</str>
          </lst>
          <lst name="appends">
            <str name="c">C</str>
          </lst>
        </initParams>
        <requestHandler name="/dump3" class="DumpRequestHandler"/>
        <requestHandler name="/dump4" class="DumpRequestHandler"/>
        <requestHandler name="/root/dump5" class="DumpRequestHandler"/>
        <requestHandler name="/root1/anotherlevel/dump6" class="DumpRequestHandler"/>
        <requestHandler name="/dump1" class="DumpRequestHandler" initParams="a"/>
        <requestHandler name="/dump2" class="DumpRequestHandler" initParams="a">
          <lst name="defaults">
            <str name="a">A1</str>
          </lst>
          <lst name="invariants">
            <str name="b">B1</str>
          </lst>
          <lst name="appends">
            <str name="c">C1</str>
          </lst>
        </requestHandler>
      

      Attachments

        1. SOLR-6365.patch
          5 kB
          Noble Paul
        2. SOLR-6365.patch
          13 kB
          Noble Paul
        3. SOLR-6365.patch
          21 kB
          Noble Paul
        4. SOLR-6365-crappy-test.patch
          4 kB
          Erick Erickson

        Issue Links

          Activity

            People

              noble.paul Noble Paul
              noble.paul Noble Paul
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: