On 5/20/2015 4:43 PM, tuxedomoon wrote:
> I'm reindexing Mongo docs into SolrCloud.  The new docs have had a few fields
> removed so upon reindexing those fields should be gone in Solr.  They are
> not.  So the result is a new doc merged with an old doc rather than a
> replacement which is what I need.
> 
> I do not know whether the issue is with my SolrJ client, Solr config or
> something else.  

Do those documents have the same value in the uniqueKey field?  It must
be an exact match -- a deviation in upper/lower case will be treated as
a new document.

If they do have identical information in the uniqueKey field, then there
are a few possible problems:

Are you indexing full documents, or are you doing Atomic Updates?  An
atomic update is by definition a change, not a replacement ... so unless
that change includes deleting fields, they would not be affected.

https://wiki.apache.org/solr/Atomic_Updates

If your collection has multiple shards, then this paragraph may apply:
What is the router set to on the collection?  If it is "implicit" then
you may have indexed the new document to a different shard, which means
that it is now in your index more than once, and which one gets returned
may not be predictable.  The same thing may be true if you are using
composite routing and including information in the key that sends the
document to a different shard from where it was originally indexed.

Thanks,
Shawn

Reply via email to