lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (Commented) (JIRA) <>
Subject [jira] [Commented] (SOLR-2841) Scriptable UpdateRequestChain
Date Mon, 17 Oct 2011 16:12:10 GMT


Jan Høydahl commented on SOLR-2841:

The DSL could be based on Groovy, JRuby, Jython or JS. Here's my quasi sketch of a Groovy
example from 2823:

...This approach also solves another wish of mine, namely being able to define chains outside
of solrconfig.xml. Logically, configuring schema and document processing is done by a "content"
guy, but configuring solrconfig.xml is done by the "hardware/operations" guys. Imagine a solr/conf/pipeline.groovy
defined in solrconfig.xml:

<updateProcessorChain class="solr.ScriptedUpdateProcessorChainFactory" file="updateprocessing.groovy"

chain simple {

chain moreComplex {
  if(doc.getFieldValue("employees") > 10)

chain logAndRun {

processor langid {
  class = "solr.LanguageIdentifierUpdateProcessorFactory"
  config("langid.fl", "title,body")
  config("langid.langField", "language")
  config("map", true)

processor copyfield {
  script = "copyfield.groovy"
  config("from", "title")
  config("to", "title_en")

I don't know what it takes to code such a thing, but if we had it, I'd never go back to defining
pipelines in XML :)
> Scriptable UpdateRequestChain
> -----------------------------
>                 Key: SOLR-2841
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: update
>            Reporter: Jan Høydahl
> UpdateProcessorChains must currently be defined with XML in solrconfig.xml. We should
explore a scriptable chain implementation with a DSL that allows for full flexibility. The
first step would be to make UpdateChain implementations pluggable in solrconfig.xml, for backward
compat support.
> Benefits and possibilities with a Scriptable UpdateChain:
> * A compact DSL for defining Processors and Chains (Workflows would be a better, less
limited term here)
> * Keeping update processor config separate from solrconfig.xml gives better separations
of roles
> * Use this as an opportunity to natively support scripting language Processors (ideas
from SOLR-1725)
> This issue is spun off from SOLR-2823.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message