You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2015/05/29 09:50:17 UTC

[jira] [Comment Edited] (SOLR-7576) Implement RequestHandler in Javascript

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

Noble Paul edited comment on SOLR-7576 at 5/29/15 7:49 AM:
-----------------------------------------------------------

 I have missed SOLR-5005
We will merge the work done in both the tickets and make this one

It also should have the security mechanisms which loading  executable code to Solr must adhere to. I'll add security to this before committing


was (Author: noble.paul):
 I have missed SOLR-5005
I'm mostly done with this. Planning to commit it soon

Do you think anything is missing  in this patch you wish to include.

The objective is not exactly to make  just a JS handler. The idea is to provide a comprehensive API set which the functional nature of Javascript can leverage on

It also should have the security mechanisms which loading  executable code to Solr must adhere to. I'll add security to this before committing

> Implement RequestHandler in Javascript
> --------------------------------------
>
>                 Key: SOLR-7576
>                 URL: https://issues.apache.org/jira/browse/SOLR-7576
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Noble Paul
>         Attachments: SOLR-7576.patch
>
>
> Solr now support dynamic loading (SOLR-7073) of components and it is secured in SOLR-7126
> We can extend the same functionality with JS as well
> example of creating a RequestHandler 
> {code:javascript}
> curl http://localhost:8983/solr/collection1/config -H 'Content-type:application/json'  -d '{
> "create-requesthandler" : {"name": "jshandler" ,
> "class":"solr.JSRequestHandler, 
> "defaults": {
> "js": "myreqhandlerjs", //this is the name of the blob in .system collection
> "version":"3",
> "sig":"mW1Gwtz2QazjfVdrLFHfbGwcr8xzFYgUOLu68LHqWRDvLG0uLcy1McQ+AzVmeZFBf1yLPDEHBWJb5KXr8bdbHN/PYgUB1nsr9pk4EFyD9KfJ8TqeH/ijQ9waa/vjqyiKEI9U550EtSzruLVZ32wJ7smvV0fj2YYhrUaaPzOn9g0="
> }
>  }  
> }'
> {code}
> To make this work
> * Solr should be started with {{-Denable.runtime.lib=true}}
> * The javascript must be loaded to the {{.system}} collection using the blob store API
> * Configure the requesthandler with the JS blob name and version
> * Sign the javascript and configure the signature if security is enabled
> The {{JSRequestHandler}} is implicitly defined and it can be accessed by hitting {{/js/<jsname>/<version>}} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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