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

Script based UpdateRequestProcessorFactory

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.4
    • 4.0-BETA, 6.0
    • update

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: