You’re right, we’re not working with a uniqueKey and I wasn’t aware of
that requirement.
What I’d like is to update the documents without having to retrieve all
of them (or their unique ids). Basically, there are some data that all
documents that match a query will share; for the sake of the example,
all Neal Stephenson’s books are going to be categorised sci-fi, so
something like the request I specified before (in the same way that
multiple documents can be deleted with just one request).
If Solr doesn’t offer that “out of the box”, could I accomplish that
with a plug-in?
Thanks a lot for the info.
On 17/09/2015 17:23, Shawn Heisey wrote:
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
--
Alfonso Muñoz-Pomer Fuentes
Software Engineer @ Expression Atlas Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer