1) if id “mydoc” doesnt exist
>
> {
> "id":"mydoc",
> "price":{"set":99}
> }
==> This will just add a new doc with two fields id:mydoc and price:99
2)
> Or what happens if the partial document update is missing the id field?
==> Update should fail as partial updates need unique key to be sent
3)
>Or what happens if you send a mixed request, containing fields with
modifiers and fields containing only the value?
==> if the atomic update logic sees a field with modifier in the supplied
doc, it treats the update as atomic (partial) update. So if your actual
doc has 10 fields and in your above example in addition to “id” and “price”
(with “set” modifier) you have a third field say “product” (without
modifier), it will be treated as a partial update and all 10 fields should
still be present post update (ofcourse with the new values for “price” and
“product”).
- Rahul
On Wed, Jul 29, 2026 at 6:57 PM Dmitri Maziuk <[email protected]>
wrote:
> On 7/29/26 07:53, [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?
> >
>
> What you would normally do for #1 is covered under "optimistic
> concurrency" and you will post
>
> }
> "id":"mydoc",
> "_version_": number,
> "price":{"set":99}
> }
>
> #2 should not work, assuming id is the unique key. And I don't think
> partial updates work with any field other than the unique key.
>
> Dima
>
>