I think I can trust you but this is weird. Funny things if you try to validate on http://jsonlint.com/ this JSON, duplicates keys are automatically removed. But the thing is, how can you possibly generate this json with Javascript Object?
It will be really nice to combine both ways that you show on the page. Something like: { "add": [ { "doc": { "id": "DOC1", "my_boosted_field": { "boost": 2.3, "value": "test" }, "my_multivalued_field": [ "aaa", "bbb" ] } }, { "commitWithin": 5000, "overwrite": false, "boost": 3.45, "doc": { "f1": "v2" } } ], "commit": {}, "optimize": { "waitFlush": false, "waitSearcher": false }, "delete": [ { "id": "ID" }, { "query": "QUERY" } ] } Thanks you for you previous response Yonik. 2011/7/20 Yonik Seeley <yo...@lucidimagination.com> > On Wed, Jul 20, 2011 at 12:16 PM, Remy Loubradou > <remyloubra...@gmail.com> wrote: > > Hi, > > I was writing a Solr Client API for Node and I found an error on this > page > > http://wiki.apache.org/solr/UpdateJSON ,on the section "Update Commands" > the > > JSON is not valid because there are duplicate keys and two times with > "add" > > and "delete". > > It's a common misconception that it's invalid JSON. Duplicate keys > are in fact legal. > > -Yonik > http://www.lucidimagination.com > > I tried with an array and it doesn't work as well, I got error > > 400, I think that's because the syntax is bad. > > > > I don't really know if I am at the good place to talk about that but ... > > that the only place I found. Sorry if it's not. > > > > Thanks, > > > > And I love Solr :) > > >