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).
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