lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajendran, Prabaharan" <Rajendra...@DNB.com>
Subject How to configure and use updateRequestProcessorChain for Solr-5.3.1
Date Wed, 22 Jun 2016 11:28:15 GMT
Hi,

I am using Solr-5.3.1 and I am trying to use updateRequestProcessorChain.
I used https://wiki.apache.org/solr/UpdateRequestProcessor  & https://github.com/pannapat/solr-script-update-processor-example
as my reference.
Please refer below for the js which I used (placed in collection1/conf/).

function processAdd(cmd) {
    "use strict";
    var doc = cmd.solrDoc;
}

function processDelete(cmd) {
}

function processMergeIndexes(cmd) {
}

function processCommit(cmd) {
}

function processRollback(cmd) {
}

function finish() {
}

Here is my solrconfig.xml configuration

<requestHandler name="/update/**" class="solr.UpdateRequestHandler">
       <lst name="defaults">
         <str name="update.chain">script</str>
       </lst>
  </requestHandler>


  <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell">
    <lst name="defaults">
      <str name="df">text</str>
    </lst>
  </initParams>

  <updateRequestProcessorChain name="script">
      <processor class="solr.StatelessScriptUpdateProcessorFactory">
        <str name="script">update-script.js</str>
        <lst name="params">
          <str name="config_param">example config parameter</str>
        </lst>
      </processor>
                  <processor class="solr.LogUpdateProcessorFactory" />
      <processor class="solr.RunUpdateProcessorFactory" />
    </updateRequestProcessorChain>

When I am trying start solr got below error
*         Collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Unable to initialize scripts: Unable to evaluate script: update-script.js

Kindly help to understand and resolve this.

Thanks,
Prabaharan


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message