On 1/2/2014 9:48 AM, elmerfudd wrote:
*ok im really lost...
Im trying to set a custom updatehandler
<snip>
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
.getLogger(myPlugin.class);
// snipped out your real code here.
@Override
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.
Thanks,
Shawn