[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805235#action_12805235
 ] 

Uri Boness commented on SOLR-1725:
----------------------------------

Lance, I lost you a bit as well.

bq. Uri, I'd prefer if the manner of configuration was as similar as possible, 
i.e. if we could get rid of the <lst name="params"> part, and instead pass all 
top-level params directly to the script (except the "scripts" param itself).

Hmm... personally I prefer configurations that clearly indicate their purpose. 
leaving out the _params_ list will make things a bit confusing - some 
parameters are available for the scripts, others are not... it's not really 
clear.

bq. manner of configuration was as similar as possible

The configuration are similar. All elements in solrconfig.xml have one standard 
way of configuration which can be anything from a _lst_, _bool_, _str_, etc.... 
Tomorrow a new processor will popup which will also require a _lst_ 
configuration... and that's fine. 

bq.Even better if the definition of a processor was in a separate xml section 
and then refer by name only in each chain, but that is a bigger change outside 
scope of this patch.

Well, indeed that's a bigger change. Like everything, this kind of 
configuration has it's pros&cons.

I guess it's best if people will just state their preferences regarding how 
they would like to see this processor configured and based on that I'll adjust 
the patch.

> Script based UpdateRequestProcessorFactory
> ------------------------------------------
>
>                 Key: SOLR-1725
>                 URL: https://issues.apache.org/jira/browse/SOLR-1725
>             Project: Solr
>          Issue Type: New Feature
>          Components: update
>    Affects Versions: 1.4
>            Reporter: Uri Boness
>         Attachments: SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch, 
> SOLR-1725.patch, SOLR-1725.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to