Running under tomcat 5.5.23 Sending the following command (productId is my document primary key):
curl http://solr.d-pmgt.tools.testserver.local:7080/solr_en/update?commit=tru e --data-binary '<add><doc><field name="productId">123</field></doc></add>' the following shows up in my log: ==> catalina_log.2008-01-16.txt <== 64.37.154.243 - - [16/Jan/2008:11:09:47 -0800] "POST /solr_en/update?commit=true HTTP/1.1" 200 28 ==> catalina.out <== Jan 16, 2008 11:09:47 AM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {add=[123]} 0 1 Looking at the current trunk, I think my update is being handled by the SolrUpdateServlet which calls XmlUpdateRequestHandler.doLegacyUpdate, which calls XmlUpdateRequestHandler.processUpdate .. processUpdate does not check the queryString for a commit, only the POSTed xml. Has this functionality been turned off in trunk? -----Original Message----- From: Ryan McKinley [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 10:45 AM To: solr-dev@lucene.apache.org Subject: Re: solrj patch to COMMIT with xml what servlet container? what happens when you call the URL directly (without solrj)? It should log *something* ryan Keene, David wrote: > When I call client.commit() (with the svn trunk head) I see nothing in > the solr logs (I think because there is no data in the post?). The solr > server seems to ignore the commit=true parameter completely. > > My solr server is running a build from svn from a couple days ago, I'm > sure I'm on 1.3.. is there a solrconfig setting to allow commits from > the querystring? Is there something else that I'm missing? The > commit=true is completely ignored on my request. Here are the logs from > my solr server (including the requests). > > I'm sure the problem has something to do with my solr server instead of > the client now, so I apologize for the trouble. If anyone can give me a > hint as to why my solr server is ignoring commit=true on the querystring > though, I'd appreciate any ideas (although that's probably better asked > on solr-users!) > > Dave > > ==> catalina_log.2008-01-15.txt <== > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 28 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 2999 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 2999 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 28 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 2999 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 28 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 2999 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 28 > XX.XX.XX.XX - - [15/Jan/2008:15:42:12 -0800] "POST > /solr_en/update?commit=true&waitFlush=true&waitSearcher=false&wt=xml&ver > sion=2.2 HTTP/1.1" 200 2999 > > ==> catalina.out <== > Jan 15, 2008 3:42:12 PM > org.apache.solr.update.processor.LogUpdateProcessor finish > INFO: {add=[ABC123-ANEW00001_CN-0000000000000001]} 0 6 > Jan 15, 2008 3:42:12 PM > org.apache.solr.update.processor.LogUpdateProcessor finish > INFO: {add=[ABC123-DNEW00001_CN-0000000000000001]} 0 5 > Jan 15, 2008 3:42:12 PM > org.apache.solr.update.processor.LogUpdateProcessor finish > INFO: {add=[ABC123-KNEW00001_CN-0000000000000001]} 0 6 > Jan 15, 2008 3:42:12 PM > org.apache.solr.update.processor.LogUpdateProcessor finish > INFO: {add=[QAQA12-QAQA00001_CN-0000000000000001]} 0 5 > > > > > -----Original Message----- > From: Ryan McKinley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 15, 2008 3:22 PM > To: solr-dev@lucene.apache.org > Subject: Re: solrj patch to COMMIT with xml > > >> org.apache.solr.update.processor.LogUpdateProcessor finish >> INFO: {add=[QAQA12-QAQA00001_CN-0000000000000001]} 0 7 >> > > That is what you get when you call: > client.add( docs ) > but what do you see when you call: > client.commit()? > > >> It seems to me that if a user does option 1: client.add(docs) they > will >> get a new UpdateRequest in the add method, setAction(commit) will > never >> get set on it and it will be processed. The user's document will get >> added but never committed (which is what I see above). >> > > correct. If you use client.add( docs ) you need to send another request > > to commit the docs. > > ryan >