RE: Delete all documents in the index
One more thanks for posting this! I struggled with the same issue yesterday and solved it with _version_ hint from mailing list . Alex. -Original Message- From: Mark Mandel [mailto:mark.man...@gmail.com] Sent: Thursday, September 06, 2012 1:53 AM To: solr-user@lucene.apache.org Subject: Re: Delete all documents in the index Thanks for posting this! I ran into exactly this issue yesterday, and ended up felting the files to get around it. Mark Sent from my mobile doohickey. On Sep 6, 2012 4:13 AM, "Rohit Harchandani" wrote: > Thanks everyone. Adding the _version_ field in the schema worked. > Deleting the data directory works for me, but was not sure why > deleting using curl was not working. > > On Wed, Sep 5, 2012 at 1:49 PM, Michael Della Bitta < > michael.della.bi...@appinions.com> wrote: > > > Rohit: > > > > If it's easy, the easiest thing to do is to turn off your servlet > > container, rm -r * inside of the data directory, and then restart > > the container. > > > > Michael Della Bitta > > > > > > Appinions | 18 East 41st St., Suite 1806 | New York, NY 10017 > > www.appinions.com Where Influence Isn't a Game > > > > > > On Wed, Sep 5, 2012 at 12:56 PM, Jack Krupansky > > > > > wrote: > > > Check to make sure that you are not stumbling into SOLR-3432: > > "deleteByQuery > > > silently ignored if updateLog is enabled, but {{_version_}} field > > > does > > not > > > exist in schema". > > > > > > See: > > > https://issues.apache.org/jira/browse/SOLR-3432 > > > > > > This could happen if you kept the new 4.0 solrconfig.xml, but > > > copied in > > your > > > pre-4.0 schema.xml. > > > > > > -- Jack Krupansky > > > > > > -Original Message- From: Rohit Harchandani > > > Sent: Wednesday, September 05, 2012 12:48 PM > > > To: solr-user@lucene.apache.org > > > Subject: Delete all documents in the index > > > > > > > > > Hi, > > > I am having difficulty deleting documents from the index using curl. > The > > > urls i tried were: > > > curl "http://localhost:9020/solr/core1/update/?stream.body= > > > *:*&commit=true" > > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > > "Content-Type: text/xml" --data-binary 'id:[* TO > > > *]' > > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > > "Content-Type: text/xml" --data-binary > > '*:*' > > > I also tried: > > > curl " > > > > > > http://localhost:9020/solr/core1/update/?stream.body=%3Cdelete%3E%3Cqu > ery%3E*:*%3C/query%3E%3C/delete%3E&commit=true > > > " > > > as suggested on some forums. I get a response with status=0 in all > cases, > > > but none of the above seem to work. > > > When I run > > > curl "http://localhost:9020/solr/core1/select?q=*:*&rows=0&wt=xml"; > > > I still get a value for "numFound". > > > > > > I am currently using solr 4.0 beta version. > > > > > > Thanks for your help in advance. > > > Regards, > > > Rohit > > >
Re: Delete all documents in the index
Thanks for posting this! I ran into exactly this issue yesterday, and ended up felting the files to get around it. Mark Sent from my mobile doohickey. On Sep 6, 2012 4:13 AM, "Rohit Harchandani" wrote: > Thanks everyone. Adding the _version_ field in the schema worked. > Deleting the data directory works for me, but was not sure why deleting > using curl was not working. > > On Wed, Sep 5, 2012 at 1:49 PM, Michael Della Bitta < > michael.della.bi...@appinions.com> wrote: > > > Rohit: > > > > If it's easy, the easiest thing to do is to turn off your servlet > > container, rm -r * inside of the data directory, and then restart the > > container. > > > > Michael Della Bitta > > > > > > Appinions | 18 East 41st St., Suite 1806 | New York, NY 10017 > > www.appinions.com > > Where Influence Isn’t a Game > > > > > > On Wed, Sep 5, 2012 at 12:56 PM, Jack Krupansky > > > wrote: > > > Check to make sure that you are not stumbling into SOLR-3432: > > "deleteByQuery > > > silently ignored if updateLog is enabled, but {{_version_}} field does > > not > > > exist in schema". > > > > > > See: > > > https://issues.apache.org/jira/browse/SOLR-3432 > > > > > > This could happen if you kept the new 4.0 solrconfig.xml, but copied in > > your > > > pre-4.0 schema.xml. > > > > > > -- Jack Krupansky > > > > > > -Original Message- From: Rohit Harchandani > > > Sent: Wednesday, September 05, 2012 12:48 PM > > > To: solr-user@lucene.apache.org > > > Subject: Delete all documents in the index > > > > > > > > > Hi, > > > I am having difficulty deleting documents from the index using curl. > The > > > urls i tried were: > > > curl "http://localhost:9020/solr/core1/update/?stream.body= > > > *:*&commit=true" > > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > > "Content-Type: text/xml" --data-binary 'id:[* TO > > > *]' > > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > > "Content-Type: text/xml" --data-binary > > '*:*' > > > I also tried: > > > curl " > > > > > > http://localhost:9020/solr/core1/update/?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true > > > " > > > as suggested on some forums. I get a response with status=0 in all > cases, > > > but none of the above seem to work. > > > When I run > > > curl "http://localhost:9020/solr/core1/select?q=*:*&rows=0&wt=xml"; > > > I still get a value for "numFound". > > > > > > I am currently using solr 4.0 beta version. > > > > > > Thanks for your help in advance. > > > Regards, > > > Rohit > > >
Re: Delete all documents in the index
Thanks everyone. Adding the _version_ field in the schema worked. Deleting the data directory works for me, but was not sure why deleting using curl was not working. On Wed, Sep 5, 2012 at 1:49 PM, Michael Della Bitta < michael.della.bi...@appinions.com> wrote: > Rohit: > > If it's easy, the easiest thing to do is to turn off your servlet > container, rm -r * inside of the data directory, and then restart the > container. > > Michael Della Bitta > > > Appinions | 18 East 41st St., Suite 1806 | New York, NY 10017 > www.appinions.com > Where Influence Isn’t a Game > > > On Wed, Sep 5, 2012 at 12:56 PM, Jack Krupansky > wrote: > > Check to make sure that you are not stumbling into SOLR-3432: > "deleteByQuery > > silently ignored if updateLog is enabled, but {{_version_}} field does > not > > exist in schema". > > > > See: > > https://issues.apache.org/jira/browse/SOLR-3432 > > > > This could happen if you kept the new 4.0 solrconfig.xml, but copied in > your > > pre-4.0 schema.xml. > > > > -- Jack Krupansky > > > > -----Original Message- From: Rohit Harchandani > > Sent: Wednesday, September 05, 2012 12:48 PM > > To: solr-user@lucene.apache.org > > Subject: Delete all documents in the index > > > > > > Hi, > > I am having difficulty deleting documents from the index using curl. The > > urls i tried were: > > curl "http://localhost:9020/solr/core1/update/?stream.body= > > *:*&commit=true" > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > "Content-Type: text/xml" --data-binary 'id:[* TO > > *]' > > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > > "Content-Type: text/xml" --data-binary > '*:*' > > I also tried: > > curl " > > > http://localhost:9020/solr/core1/update/?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true > > " > > as suggested on some forums. I get a response with status=0 in all cases, > > but none of the above seem to work. > > When I run > > curl "http://localhost:9020/solr/core1/select?q=*:*&rows=0&wt=xml"; > > I still get a value for "numFound". > > > > I am currently using solr 4.0 beta version. > > > > Thanks for your help in advance. > > Regards, > > Rohit >
Re: Delete all documents in the index
Rohit: If it's easy, the easiest thing to do is to turn off your servlet container, rm -r * inside of the data directory, and then restart the container. Michael Della Bitta Appinions | 18 East 41st St., Suite 1806 | New York, NY 10017 www.appinions.com Where Influence Isn’t a Game On Wed, Sep 5, 2012 at 12:56 PM, Jack Krupansky wrote: > Check to make sure that you are not stumbling into SOLR-3432: "deleteByQuery > silently ignored if updateLog is enabled, but {{_version_}} field does not > exist in schema". > > See: > https://issues.apache.org/jira/browse/SOLR-3432 > > This could happen if you kept the new 4.0 solrconfig.xml, but copied in your > pre-4.0 schema.xml. > > -- Jack Krupansky > > -Original Message- From: Rohit Harchandani > Sent: Wednesday, September 05, 2012 12:48 PM > To: solr-user@lucene.apache.org > Subject: Delete all documents in the index > > > Hi, > I am having difficulty deleting documents from the index using curl. The > urls i tried were: > curl "http://localhost:9020/solr/core1/update/?stream.body= > *:*&commit=true" > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > "Content-Type: text/xml" --data-binary 'id:[* TO > *]' > curl "http://localhost:9020/solr/core1/update/?commit=true"; -H > "Content-Type: text/xml" --data-binary '*:*' > I also tried: > curl " > http://localhost:9020/solr/core1/update/?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true > " > as suggested on some forums. I get a response with status=0 in all cases, > but none of the above seem to work. > When I run > curl "http://localhost:9020/solr/core1/select?q=*:*&rows=0&wt=xml"; > I still get a value for "numFound". > > I am currently using solr 4.0 beta version. > > Thanks for your help in advance. > Regards, > Rohit
Re: Delete all documents in the index
Check to make sure that you are not stumbling into SOLR-3432: "deleteByQuery silently ignored if updateLog is enabled, but {{_version_}} field does not exist in schema". See: https://issues.apache.org/jira/browse/SOLR-3432 This could happen if you kept the new 4.0 solrconfig.xml, but copied in your pre-4.0 schema.xml. -- Jack Krupansky -Original Message- From: Rohit Harchandani Sent: Wednesday, September 05, 2012 12:48 PM To: solr-user@lucene.apache.org Subject: Delete all documents in the index Hi, I am having difficulty deleting documents from the index using curl. The urls i tried were: curl "http://localhost:9020/solr/core1/update/?stream.body= *:*&commit=true" curl "http://localhost:9020/solr/core1/update/?commit=true"; -H "Content-Type: text/xml" --data-binary 'id:[* TO *]' curl "http://localhost:9020/solr/core1/update/?commit=true"; -H "Content-Type: text/xml" --data-binary '*:*' I also tried: curl " http://localhost:9020/solr/core1/update/?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true " as suggested on some forums. I get a response with status=0 in all cases, but none of the above seem to work. When I run curl "http://localhost:9020/solr/core1/select?q=*:*&rows=0&wt=xml"; I still get a value for "numFound". I am currently using solr 4.0 beta version. Thanks for your help in advance. Regards, Rohit