hi I think I have found the problem its windows which is acctualy not able to distinguish between double and single quote and thus curl is trying to resolve the host under double quote individually after -d and thus causing the error but how do I rectify this in windows that is what I am looking for any help would be appreciated.
thanks regards rohan On Mon, Feb 4, 2013 at 4:28 PM, Rohan Thakur <rohan.i...@gmail.com> wrote: > hi gora > > I have tried what you told but now its giving error like: > > C:\Users\rohan>curl 127.0.0.1:8983/solr/update?commit=true -H > "Content-type:appl > ication/json" -d '[{"value":"samsung-wave-s5253-silver", > "value":{"set":"samsung > -111"}}]' > {"responseHeader":{"status":500,"QTime":1},"error":{"msg":"JSON Parse > Error: cha > r=',position=0 BEFORE=''' > AFTER='[{value:samsung-wave-s5253-silver,'","trace":"o > rg.apache.noggit.JSONParser$ParseException: JSON Parse Error: > char=',position=0 > BEFORE=''' AFTER='[{value:samsung-wave-s5253-silver,'\r\n\tat > org.apache.noggit. > JSONParser.err(JSONParser.java:221)\r\n\tat > org.apache.noggit.JSONParser.next(JS > ONParser.java:620)\r\n\tat > org.apache.noggit.JSONParser.nextEvent(JSONParser.jav > a:662)\r\n\tat > org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoade > r.processUpdate(JsonLoader.java:106)\r\n\tat > org.apache.solr.handler.loader.Json > > Loader$SingleThreadedJsonLoader.load(JsonLoader.java:96)\r\n\tat > org.apache.solr > .handler.loader.JsonLoader.load(JsonLoader.java:60)\r\n\tat > org.apache.solr.hand > > ler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)\r\n\tat > org.apache > > .solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBas > e.java:74)\r\n\tat > org.apache.solr.handler.RequestHandlerBase.handleRequest(Requ > estHandlerBase.java:135)\r\n\tat > org.apache.solr.core.SolrCore.execute(SolrCore. > java:1816)\r\n\tat > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispat > chFilter.java:448)\r\n\tat > org.apache.solr.servlet.SolrDispatchFilter.doFilter(S > olrDispatchFilter.java:269)\r\n\tat > org.eclipse.jetty.servlet.ServletHandler$Cac > hedChain.doFilter(ServletHandler.java:1307)\r\n\tat > org.eclipse.jetty.servlet.Se > rvletHandler.doHandle(ServletHandler.java:453)\r\n\tat > org.eclipse.jetty.server. > handler.ScopedHandler.handle(ScopedHandler.java:137)\r\n\tat > org.eclipse.jetty.s > ecurity.SecurityHandler.handle(SecurityHandler.java:560)\r\n\tat > org.eclipse.jet > ty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\r\n\tat > org.e > > > clipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)\r\ > n\tat > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)\ > r\n\tat > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.j > ava:193)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandler.doScope(Context > Handler.java:1006)\r\n\tat > org.eclipse.jetty.server.handler.ScopedHandler.handle > (ScopedHandler.java:135)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandler > Collection.handle(ContextHandlerCollection.java:255)\r\n\tat > org.eclipse.jetty.s > erver.handler.HandlerCollection.handle(HandlerCollection.java:154)\r\n\tat > org.e > > clipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\r\n\t > > at org.eclipse.jetty.server.Server.handle(Server.java:365)\r\n\tat > org.eclipse.j > > etty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485 > )\r\n\tat > org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(Blocking > HttpConnection.java:53)\r\n\tat > org.eclipse.jetty.server.AbstractHttpConnection. > content(AbstractHttpConnection.java:937)\r\n\tat > org.eclipse.jetty.server.Abstra > > ctHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)\r\n\tat > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)\r\n\tat > org.ec > lipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)\r\n\tat > org.ecli > > > pse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\r > \n\tat > org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(Socket > Connector.java:264)\r\n\tat > org.eclipse.jetty.util.thread.QueuedThreadPool.runJo > b(QueuedThreadPool.java:608)\r\n\tat > org.eclipse.jetty.util.thread.QueuedThreadP > ool$3.run(QueuedThreadPool.java:543)\r\n\tat java.lang.Thread.run(Unknown > Source > )\r\n","code":500}} > curl: (6) Could not resolve host: value:set:samsung-111; Host not found > > even in place of 127.0.0.1 i have tried using localhost....but it still > gives this error...im using this from command line in windows.... > > > On Mon, Feb 4, 2013 at 2:07 PM, Gora Mohanty <g...@mimirtech.com> wrote: > >> On 4 February 2013 13:29, Rohan Thakur <rohan.i...@gmail.com> wrote: >> > hi arcadius >> > >> > can you also help me with partial document update...I have followed >> what is >> > written in this blog but its giving me error.... >> > http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/ >> > >> > error im getting after this command : >> > C:\Users\rohan>curl localhost:8983/solr/update?commit=true -H >> > Content-type:appli >> > cation/json -d >> [{"value":"samsung-s5610-gray","value":{"set":samsung-111}}] >> [...] >> >> I am guessing it is a shell-quoting problem. Please follow >> the instructions in that blog carefully. You probably need to >> double-quote any values that should be strings, e.g., >> samsung-111, and need to put the entire argument of >> -d within single quotes (do not put any other single quotes >> inside this argument unless you escape them properly). >> >> Regards, >> Gora >> > >