Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Make it possible to define paramsets and use them directly in requests

      example

      curl http://localhost:8983/solr/collection1/config/params -H 'Content-type:application/json'  -d '{
      "set" : {"x": {
                    "a":"A val",
                    "b": "B val"}
                 },
      "set" : {"y": {
                     "x":"X val",
                     "Y": "Y val"}
                 },
      "update" : {"y": {
                     "x":"X val modified"}
                 },
      
      "delete" : "z"
      }'
      #do a GET to view all the configured params
      curl http://localhost:8983/solr/collection1/config/params
      
      #or  GET with a specific name to get only one set of params
      curl http://localhost:8983/solr/collection1/config/params/x
      

      This data will be stored in conf/params.json

      This is used requesttime and adding/editing params will not result in core reload and it will have no impact on the performance

      example usage http://localhost/solr/collection/select?useParams=x,y

      or it can be directly configured with a request handler as follows

      <requestHandler name="/dump1" class="DumpRequestHandler" useParams="x"/>
      

      useParams specified in request overrides the one specified in requestHandler

      A more realistic example

      curl http://localhost:8983/solr/collection1/config/params -H 'Content-type:application/json'  -d '{
      "set":{"query":{
          "defType":"edismax",
          "q.alt":"*:*",
          "rows":10,
          "fl":"*,score"  },
        "facets":{
          "facet":"on",
          "facet.mincount": 1
        },
       "velocity":{
         "wt": "velocity",
         "v.template":"browse",
         "v.layout": "layout"
       }
      }
      }
      

      and use all of them directly is a requesthandler

        <requestHandler name="/browse" class="solr.SearchHandler" useParams="query,facets,velocity,browse"/>  
      

        Attachments

        1. SOLR-6770.patch
          40 kB
          Noble Paul
        2. SOLR-6770.patch
          37 kB
          Noble Paul
        3. SOLR-6770.patch
          33 kB
          Noble Paul

          Activity

            People

            • Assignee:
              noble.paul Noble Paul
              Reporter:
              noble.paul Noble Paul
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: