lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-1725) Script based UpdateRequestProcessorFactory
Date Mon, 06 Aug 2012 22:11:02 GMT

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

Uwe Schindler commented on SOLR-1725:
-------------------------------------

Hoss, you are right, it is not required that JS is available, the Java 6 specs says [http://download.oracle.com/otndocs/jcp/j2se-1.6.0-pr-spec-oth-JSpec/]:

{quote}
JSR 223: Scripting for the Java Platform  
A large percentage of Java developers also use scripting languages. While the Java language
is suitable for many tasks, and especially for writing robust, long-lived applications, scripting
languages are useful for many other tasks.

JSR 223 defines a framework for connecting interpreters of arbitrary scripting languages
to Java programs. It includes facilities for locating the available scripting engines, invoking
scripts from Java code and vice versa, and making Java application objects visible to scripts.
The framework is divided into two parts, the Scripting API and an optional Web Scripting Framework.
This feature will incorporate just the Scripting API into this version of the Java SE platform.

There will be no requirement that any particular scripting language be supported by the platform;
implementors may choose to include support for the scripting language(s) of their choice as
they see fit.

[ JSR 223; javax.script ]
{quote}

But all JDKs on all platforms except FreeBSD contain them. So we should have the "error messages"
printed on failure to lookup engine and the assumption in test as you committed.

But as Erik says, too: No need to ship engines. Its just bloat because there are millions
of them :-)
                
> 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
>            Priority: Critical
>              Labels: UpdateProcessor
>             Fix For: 4.0
>
>         Attachments: SOLR-1725-rev1.patch, SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch,
SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch,
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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message