lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: custom updateHandler
Date Thu, 02 Jan 2014 17:21:49 GMT
On 1/2/2014 9:48 AM, elmerfudd wrote:
> *ok im really lost...
> Im trying to set a custom updatehandler


> then trying to index a file - but the field wont change!
> how come?

At a quick glance, it all looks right, but I could be completely wrong 
about that.  I made my custom update chain the default, because it was 
the only way I could find to make it work with the dataimporter.

As a troubleshooting step, you should create a static logger object and 
put a logging call at the WARN level in your code just to see whether 
it's being called.  Here's a code excerpt for this:


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class myPlugin extends UpdateRequestProcessorFactory
   private final static Logger LOG = LoggerFactory

// snipped out your real code here.

   public void processAdd(AddUpdateCommand cmd) throws IOException {
     LOG.warn("Logging statement to make sure it's being called.");


Just FYI - Java convention says your class should be named MyPlugin, not 
myPlugin.  Either will work, but generally speaking identifiers that 
start with lowercase letters are variables, not class names.


View raw message