[
https://issues.apache.org/jira/browse/SOLR-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated SOLR-5005:
-------------------------------
Attachment: SOLR-5005_ScriptRequestHandler_take3.patch
I took Noble's patch and ran with it a bit. The attached patch fixed a bunch
of bugs, generally improved code I didn't like, renamed the package, class
names, parameters, etc. to my liking and for consistency with
ScriptUpdateRequestProcessor, and I added support for other scripting
languages. It needs tests still, and some documentation. *This is a good
point to get peer-review before continuing further.*
Noble, it seems you had some work-in-progress ideas for a DSL-like approach to
querying, as evidenced in QueryUtil. I didn't touch that part as it's not yet
clear what your end-vision is going to look like. If you don't have energy to
continue that any time soon, it might better belong as a separate issue, and
purge the code from this one.
Oh, one thing I wasn't clear on was why Docs.java is what it is -- a
ResultContext & Iterator<SolrDocument. Was this intended as a general utility
to exist outside of this scripting support? It seems so. In
ScriptMethods.query(), I use it to "materialize" the ResultContext into a
SolrDocumentList which is more usable by scripts.
> JavaScriptRequestHandler
> ------------------------
>
> Key: SOLR-5005
> URL: https://issues.apache.org/jira/browse/SOLR-5005
> Project: Solr
> Issue Type: New Feature
> Reporter: David Smiley
> Assignee: Noble Paul
> Attachments: patch, SOLR-5005.patch, SOLR-5005.patch,
> SOLR-5005.patch, SOLR-5005_ScriptRequestHandler_take3.patch
>
>
> A user customizable script based request handler would be very useful. It's
> inspired from the ScriptUpdateRequestProcessor, but on the search end. A user
> could write a script that submits searches to Solr (in-VM) and can react to
> the results of one search before making another that is formulated
> dynamically. And it can assemble the response data, potentially reducing
> both the latency and data that would move over the wire if this feature
> didn't exist. It could also be used to easily add a user-specifiable search
> API at the Solr server with request parameters governed by what the user
> wants to advertise -- especially useful within enterprises. And, it could be
> used to enforce security requirements on allowable parameter valuables to
> Solr, so a javascript based Solr client could be allowed to talk to only a
> script based request handler which enforces the rules.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]