On Thu, Jul 12, 2012 at 12:52 PM, Yonik Seeley
On Thu, Jul 12, 2012 at 12:38 PM, Jonatan Fournier
On Thu, Jul 12, 2012 at 11:05 AM, Erick Erickson
The partial documents update that Jonatan references also requires
that all the fields be stored.
If my only fields with stored="false" are copyField (e.g. I don't need
their content to rebuild the document), are they gonna be re-copied
with the partial document update?
Correct - your setup should be fine. Only original source fields (non
copyField targets) should have stored=true
Another question I had related to partial update...
$ ./post.sh foo.json
not found for update. id=foo","code":409}}
Is there a flag for: if document does not exist, create it for me? The
thing is that I don't know in advance if the document already exist
(of course I could query first.. but I have millions of entry to
process, might exist, might be an update I don't know...)
My naive approach was to have in the same request two documents, one
with only "set" using the unique ID, and then in the second one all
the "add" (concerning multivalue field).
So it would do the following:
1. Document (with id) exist or not don't care, use the following "set"
command to update/create
2. 2nd pass, I know you exist (with above id), please add all those to
the multivalue fields (none of those fields are in the initial
My rationale is that if the document exists, reset some fields, and
then append the multivalue fields (those multivalue fields express
The reason I created 2 documents is that Solr doesn't seem happy if I
mix set and add in the same document :)