Hi Dario

I see your point. As you already know how it behaves in most of the cases you 
are outlining, I encourage you to update the doc by yourself and open a pull 
request. The doc-files are in the git repo, here the one you are referring to:
https://github.com/apache/solr/blob/main/solr/solr-ref-guide/modules/indexing-guide/pages/partial-document-updates.adoc

You are able to edit the file directly on Github and open a  PR without closing 
the repo, not sure how practical this is for adoc-files though.

Thanks,

Renato


> On 29 Jul 2026, at 14:53, <[email protected]> <[email protected]> wrote:
> 
> Dear Solr Team
> 
> What happens when you send a partial document update like the following?
> 
> 
> {
> "id":"mydoc",
> "price":{"set":99}
> }
> 
> but no document with the id "mydoc" exists at this moment.
> 
> Or what happens if the partial document update is missing the id field?
> 
> Or what happens if you send a mixed request, containing fields with modifiers 
> and fields containing only the value?
> 
> {
> "id":"mydoc",
> "name": "product",
> "price":{"set":99}
> }
> 
> 
> I personally know that in the first case it acts as an upsert. so inserting 
> the document if its missing, and updating it if it already  exists.
> And in the second case it always inserts a new document, with its id being 
> generated.
> 
> For the third case I am not entirely sure, but I think if there is at least 
> one field in the request with a modifier the whole request acts as a partial 
> document update and fields without modifiers are handled as if they have the 
> modifier "set". Thats what the behaviour on solr 9.10.1 looks like at least.
> 
> The Documentation does not really explain any of the above cases clearly. 
> This also leads to AI making very questionable statements that are just wrong.
> 
> https://share.google/aimode/rZE2udrRajAUNDD6y
> Google just casually tells us that it only acts as an upsert but ONLY if the 
> document already exists in the collection, which is wrong and also does not 
> make any sense as that would not be an upsert.
> 
> https://chatgpt.com/s/t_6a69f66582dc81919da8e03451e267f1
> Also Chatgpt is just wrong about it.
> 
> As far as I understand it, partial document updates were introduced in solr 4 
> and the upsert behaviour was introduced in solr 4.1. but as its not clearly 
> documented I am not 100% sure.
> https://stackoverflow.com/questions/14886814/can-solr-perform-an-upsert#comment21025920_14888083
> 
> Kind Regards
> 

Reply via email to