lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: SOLRJ replace document
Date Fri, 18 Oct 2013 21:27:23 GMT
On 10/18/2013 2:59 PM, Brent Ryan wrote:
> How do I replace a document in solr using solrj library?  I keep getting
> this error back:
> org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
> Atomic document updates are not supported unless <updateLog/> is configured
> I don't want to do partial updates, I just want to replace it...

Replacing a document is done by simply adding the document, in the same 
way as if you were adding a new one.  If you have properly configured 
Solr, the old one will be deleted before the new one is inserted.  
Properly configuring Solr means that you have a uniqueKey field in 
yourschema, and that it is a simple type like string, int, long, etc, 
and is not multivalued. A TextField type that is tokenized cannot be 
used as the uniqueKey field.


View raw message