On 4/5/2013 12:52 PM, Curtis Beattie wrote:
I am experiencing some peculiar behavior when updating a document. I'm
curious whether this is "working as intended" or whether it is a
defect. Allow me to articulate the problem using an example (should be
easily reproducable with the "example" configuration data).

The workflow is as follows:

1) Create a document with fields: id, name_s and keywords_ss (works as
expected).
2) Update the document by specifying id and replacing keywords_ss
(works as expected).
3) Update the document by only specifying id (unusual behavior:
document is "wiped")

When you do your third step, nothing in the XML you are sending says "update." There is no way for Solr to know that you intended it to be a fragment specifying a partial document update. Because it looks like a new document with only one field defined, Solr does what it has always done - delete the old one and add the new one. I think it's working as intended.

If it can be implemented without major headaches, I think that partial document updates should use a different XML tag than "add" ... like "update."

Thanks,
Shawn

Reply via email to