You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Paul Tomblin <pt...@xcski.com> on 2010/03/02 01:02:50 UTC

Can't delete from curl

I have a schema with a field name "category" (<field name="category"
type="string" stored="true" indexed="true"/>).  I'm trying to delete
everything with a certain value of category with curl:

I send:

curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
text/xml" --data-binary '<delete><query>category:Banks</query></delete>'

Response is:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">23</int></lst>
</response>

I send

curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
text/xml" --data-binary '<commit/>'

Response is:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">1914</int></lst>
</response>

but when I go back and query, it shows all the same results as before.

Why isn't it deleting?

-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin

Re: Can't delete from curl

Posted by Paul Tomblin <pt...@xcski.com>.
On Mon, Mar 8, 2010 at 9:39 PM, Lance Norskog <go...@gmail.com> wrote:

> ... curl http://xen1.xcski.com:8080/solrChunk/nutch/select
>
> that should be /update, not /select


Ah, that seems to have fixed it.  Thanks.



-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin

Re: Can't delete from curl

Posted by Lance Norskog <go...@gmail.com>.
... curl http://xen1.xcski.com:8080/solrChunk/nutch/select

that should be /update, not /select

On Sun, Mar 7, 2010 at 4:32 PM, Paul Tomblin <pt...@xcski.com> wrote:
> On Tue, Mar 2, 2010 at 1:22 AM, Lance Norskog <go...@gmail.com> wrote:
>
>> On Mon, Mar 1, 2010 at 4:02 PM, Paul Tomblin <pt...@xcski.com> wrote:
>> > I have a schema with a field name "category" (<field name="category"
>> > type="string" stored="true" indexed="true"/>).  I'm trying to delete
>> > everything with a certain value of category with curl:...
>> >
>> > I send:
>> >
>> > curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
>> > text/xml" --data-binary '<delete><query>category:Banks</query></delete>'
>> >
>> > Response is:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <response>
>> > <lst name="responseHeader"><int name="status">0</int><int
>> > name="QTime">23</int></lst>
>> > </response>
>> >
>> > I send
>> >
>> > curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
>> > text/xml" --data-binary '<commit/>'
>> >
>> > Response is:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <response>
>> > <lst name="responseHeader"><int name="status">0</int><int
>> > name="QTime">1914</int></lst>
>> > </response>
>> >
>> > but when I go back and query, it shows all the same results as before.
>> >
>> > Why isn't it deleting?
>>
>> Do you query with curl also? If you use a web browser, Solr by default
>> uses http caching, so your browser will show you the old result of the
>> query.
>>
>>
> I think you're right about that.  I tried using curl, and it did go to zero.
>  But now I've got a different problem: sometimes when I try to commit, I get
> a NullPointerException:
>
>
> curl http://xen1.xcski.com:8080/solrChunk/nutch/select -H "Content-Type:
> text/xml" --data-binary '<commit/>'<html><head><title>Apache Tomcat/6.0.20 -
> Error report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
> </head><body><h1>HTTP Status 500 - null
>
> java.lang.NullPointerException
> at java.io.StringReader.&lt;init&gt;(StringReader.java:33)
> at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:173)
> at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
> at org.apache.solr.search.QParser.getQuery(QParser.java:131)
> at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
> at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
> at java.lang.Thread.run(Thread.java:619)
> </h1><HR size="1" noshade="noshade"><p><b>type</b> Status
> report</p><p><b>message</b> <u>null
>
> java.lang.NullPointerException
> at java.io.StringReader.&lt;init&gt;(StringReader.java:33)
> at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:173)
> at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
> at org.apache.solr.search.QParser.getQuery(QParser.java:131)
> at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
>
>
> --
> http://www.linkedin.com/in/paultomblin
> http://careers.stackoverflow.com/ptomblin
>



-- 
Lance Norskog
goksron@gmail.com

Re: Can't delete from curl

Posted by Paul Tomblin <pt...@xcski.com>.
On Tue, Mar 2, 2010 at 1:22 AM, Lance Norskog <go...@gmail.com> wrote:

> On Mon, Mar 1, 2010 at 4:02 PM, Paul Tomblin <pt...@xcski.com> wrote:
> > I have a schema with a field name "category" (<field name="category"
> > type="string" stored="true" indexed="true"/>).  I'm trying to delete
> > everything with a certain value of category with curl:
> >
> > I send:
> >
> > curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
> > text/xml" --data-binary '<delete><query>category:Banks</query></delete>'
> >
> > Response is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <response>
> > <lst name="responseHeader"><int name="status">0</int><int
> > name="QTime">23</int></lst>
> > </response>
> >
> > I send
> >
> > curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
> > text/xml" --data-binary '<commit/>'
> >
> > Response is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <response>
> > <lst name="responseHeader"><int name="status">0</int><int
> > name="QTime">1914</int></lst>
> > </response>
> >
> > but when I go back and query, it shows all the same results as before.
> >
> > Why isn't it deleting?
>
> Do you query with curl also? If you use a web browser, Solr by default
> uses http caching, so your browser will show you the old result of the
> query.
>
>
I think you're right about that.  I tried using curl, and it did go to zero.
 But now I've got a different problem: sometimes when I try to commit, I get
a NullPointerException:


curl http://xen1.xcski.com:8080/solrChunk/nutch/select -H "Content-Type:
text/xml" --data-binary '<commit/>'<html><head><title>Apache Tomcat/6.0.20 -
Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - null

java.lang.NullPointerException
at java.io.StringReader.&lt;init&gt;(StringReader.java:33)
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:173)
at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
at org.apache.solr.search.QParser.getQuery(QParser.java:131)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
report</p><p><b>message</b> <u>null

java.lang.NullPointerException
at java.io.StringReader.&lt;init&gt;(StringReader.java:33)
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:173)
at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
at org.apache.solr.search.QParser.getQuery(QParser.java:131)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin

Re: Can't delete from curl

Posted by Lance Norskog <go...@gmail.com>.
On Mon, Mar 1, 2010 at 4:02 PM, Paul Tomblin <pt...@xcski.com> wrote:
> I have a schema with a field name "category" (<field name="category"
> type="string" stored="true" indexed="true"/>).  I'm trying to delete
> everything with a certain value of category with curl:
>
> I send:
>
> curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
> text/xml" --data-binary '<delete><query>category:Banks</query></delete>'
>
> Response is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">23</int></lst>
> </response>
>
> I send
>
> curl http://localhost:8080/solrChunk/nutch/update -H "Content-Type:
> text/xml" --data-binary '<commit/>'
>
> Response is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">1914</int></lst>
> </response>
>
> but when I go back and query, it shows all the same results as before.
>
> Why isn't it deleting?
>
> --
> http://www.linkedin.com/in/paultomblin
> http://careers.stackoverflow.com/ptomblin
>

Do you query with curl also? If you use a web browser, Solr by default
uses http caching, so your browser will show you the old result of the
query.

-- 
Lance Norskog
goksron@gmail.com