lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uri Boness (JIRA)" <>
Subject [jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory
Date Sat, 23 Jan 2010 15:22:17 GMT


Uri Boness commented on SOLR-1725:

If we move this to the contrib. we'll need to extract the script engine abstraction of a separate
contrib. utils library (so the DIH will be able to utilize it). I believe this can create
a bit of a mess just for this small (though useful) functionality. Is there are real reason
for not keeping it in the core? 

I think either way, if people will want to use it they'll need to read somewhere how... I
think it'd be nice to save them the extra effort of putting an extra jar file in the lib directory
- the configuration (writing the script and configuring the update processors) they'll need
to adjust anyway. The only thing that we must stress in the documentation (both in the schema
and in the wiki) is that they can only use this feature in Java 6.

Two additional things to note:
1. JDK 5 has reached the end of service life (EOSL) already and is not actively supported
by Sun (/Oracle).
2. The general recommendation is to run Solr on Java 6 anyways (due to some threading issues
in Java 5).

> Script based UpdateRequestProcessorFactory
> ------------------------------------------
>                 Key: SOLR-1725
>                 URL:
>             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
> 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.

View raw message