Hey Stephan, Thanks, but I already used this solr client and I got an error when I add too much documents "FATAL ERROR: JS Allocation failed - process out of memory". I didn't find the source of the problem in the solr client. So I decided to write my own without this error hopefully and also I'm using JSON documents and not XML documents. I read a post saying that I can get better performance using JSON documents.
I will release this client as an npm module. Regards, Remy 2011/7/25 Stefan Matheis <matheis.ste...@googlemail.com> > Remy, > > didn't use it myself .. but you know about https://github.com/gsf/node-** > solr <https://github.com/gsf/node-solr> ? > > Regards > Stefan > > Am 20.07.2011 20:05, schrieb Remy Loubradou: > > 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<yonik@lucidimagination.**com<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<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 <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 :) >>>> >>>> >>> >>