Hi-
 
It appears that DirectUpdateHandler2.java does not actually implement the
parameters that control whether to override existing documents. Should I use
DirectUpdateHandler instead? Apparently DUH is slower than DUH2, but DUH
implements these parameters.  (We do so many overwrites that switching to
DUH is probably a win.)

>From DirectUpdateHandler2.java:addDoc()
 
        if (!cmd.allowDups && !cmd.overwritePending &&
!cmd.overwriteCommitted) {
          throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,"unsupported param combo:" + cmd);
          // this would need a reader to implement (to be able to check
committed
          // before adding.)
          // return addNoOverwriteNoDups(cmd);
        } else if (!cmd.allowDups && !cmd.overwritePending &&
cmd.overwriteCommitted) {
          rc = addConditionally(cmd);
        } else if (!cmd.allowDups && cmd.overwritePending &&
!cmd.overwriteCommitted) {
          throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,"unsupported param combo:" + cmd);
        } else if (!cmd.allowDups && cmd.overwritePending &&
cmd.overwriteCommitted) {
          rc = overwriteBoth(cmd);
        } else if (cmd.allowDups && !cmd.overwritePending &&
!cmd.overwriteCommitted) {
          rc = allowDups(cmd);
        } else if (cmd.allowDups && !cmd.overwritePending &&
cmd.overwriteCommitted) {
          throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,"unsupported param combo:" + cmd);
        } else if (cmd.allowDups && cmd.overwritePending &&
!cmd.overwriteCommitted) {
          throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,"unsupported param combo:" + cmd);
        } else if (cmd.allowDups && cmd.overwritePending &&
cmd.overwriteCommitted) {
          rc = overwriteBoth(cmd);
        }

Reply via email to