Hi Highlight Shawn answer : "  Solr does not have
anything like the SQL syntax that lets you update all rows that match a
WHERE clause."

In particular when adding a document to Solr, you are actually adding a new
Document to the index ( under the hood) .
The atomic update is only a user friendly way to send less information in
the REST API request, but actually a simple update never happens.

The id is used to retrieve the original document if present.
The original fields stored are retrieved and the new document built
accordingly with the user update.

What you were expecting is not so immediate, also because you are not
telling Solr anywhere which is the query to use to get the set of documents
to update.
Actually could be an improvement, but should be designed and implemented.

Cheers

2015-09-17 17:23 GMT+01:00 Shawn Heisey <apa...@elyograg.org>:

> On 9/17/2015 10:14 AM, Shawn Heisey wrote:
> > This assumes that the uniqueKey field is "id". Unless your uniqueKey
> > field is "author_s" (which is highly unlikely), the JSON that you used
> > will not work. Chances are that the request failed, that nothing
> happened.
>
> On my first reading, I did not catch that you said it added a new
> document with the fields you specified, so my assumption that the
> request failed was clearly wrong.
>
> I think this must mean that you have disabled (removed) the uniqueKey
> setting in your schema -- adding a document that does not have the
> uniqueKey field will fail.  I'm reasonably certain that you cannot do
> atomic updates if you do not have a uniqueKey.
>
> I have just checked our documentation for Atomic Updates ... and the
> uniqueKey requirement is NOT mentioned.  I think that's a documentation
> bug.
>
> Thanks,
> Shawn
>
>


-- 
--------------------------

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Reply via email to