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

Script based UpdateRequestProcessorFactory



    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 4.0-BETA, 6.0
    • Component/s: update
    • Labels:


      A script based UpdateRequestProcessorFactory (Uses JDK6 script engine support). The main goal of this plugin is to be able to configure/write update processors without the need to write and package Java code.

      The update request processor factory enables writing update processors in scripts located in solr.solr.home directory. The functory accepts one (mandatory) configuration parameter named scripts which accepts a comma-separated list of file names. It will look for these files under the conf directory in solr home. When multiple scripts are defined, their execution order is defined by the lexicographical order of the script file name (so scriptA.js will be executed before scriptB.js).

      The script language is resolved based on the script file extension (that is, a *.js files will be treated as a JavaScript script), therefore an extension is mandatory.

      Each script file is expected to have one or more methods with the same signature as the methods in the UpdateRequestProcessor interface. It is not required to define all methods, only those hat are required by the processing logic.

      The following variables are define as global variables for each script:

      • req - The SolrQueryRequest
      • rsp- The SolrQueryResponse
      • logger - A logger that can be used for logging purposes in the script


        1. SOLR-1725.patch
          38 kB
          Uri Boness
        2. SOLR-1725.patch
          34 kB
          Uri Boness
        3. SOLR-1725.patch
          36 kB
          Uri Boness
        4. SOLR-1725.patch
          54 kB
          Uri Boness
        5. SOLR-1725.patch
          59 kB
          Uri Boness
        6. SOLR-1725-rev1.patch
          60 kB
          Simon Rosenthal
        7. SOLR-1725.patch
          58 kB
          Erik Hatcher
        8. SOLR-1725.patch
          34 kB
          Erik Hatcher
        9. SOLR-1725.patch
          33 kB
          Erik Hatcher
        10. SOLR-1725.patch
          34 kB
          Erik Hatcher
        11. SOLR-1725.patch
          52 kB
          Chris M. Hostetter
        12. SOLR-1725.patch
          69 kB
          Chris M. Hostetter
        13. SOLR-1725.patch
          70 kB
          Chris M. Hostetter
        14. SOLR-1725.patch
          71 kB
          Chris M. Hostetter
        15. SOLR-1725.patch
          71 kB
          Chris M. Hostetter



            • Assignee:
              hossman Chris M. Hostetter
              uboness Uri Boness
            • Votes:
              10 Vote for this issue
              13 Start watching this issue


              • Created: