lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhawna singh <>
Subject Null exception in UpdateRequestProcessor
Date Sat, 20 Aug 2011 18:44:01 GMT
Hi All,

I am trying to add a field in my Solr document based on the domain.
Now that I have set it up using UpdateProcessorChain, I am running into null
Here is what I have-
In SolrConfig.xml
<updateRequestProcessorChain name="mychain" >
    <processor class="mysolr.AddConditionalFieldsFactory" >
   <processor class="solr.RunUpdateProcessorFactory" />
   <processor class="solr.LogUpdateProcessorFactory" />

  <requestHandler name="/update/csv" class="solr.CSVRequestHandler"
startup="lazy" >
        <lst name="defaults">
            <str name="update.chain">mychain</str>

Here is my java code-
package mysolr;


import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.request.SolrQueryResponse;
import org.apache.solr.update.AddUpdateCommand;
import org.apache.solr.update.processor.UpdateRequestProcessor;
import org.apache.solr.update.processor.UpdateRequestProcessorFactory;

public class AddConditionalFieldsFactory extends
  public UpdateRequestProcessor getInstance(SolrQueryRequest req,
SolrQueryResponse rsp, UpdateRequestProcessor next)
      System.out.println("From customization:");
    return new AddConditionalFields(next);

class AddConditionalFields extends UpdateRequestProcessor
  public AddConditionalFields( UpdateRequestProcessor next) {

    super( next );

  public void processAdd(AddUpdateCommand cmd) throws IOException {
    SolrInputDocument doc = cmd.getSolrInputDocument();

    Object v = doc.getFieldValue( "url" );
    if( v != null ) {
      String url =  v.toString();
      if( url.contains("question") ) {
        doc.addField( "tierFilter", "1" );

    // pass it up the chain

Here is my Java code-
and I get the following error when I try to index-
Aug 20, 2011 10:48:43 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.AbstractMethodError  at

Any pointers please, I am using Solr 3.3


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