delete query with solr 3.5

459 views
Skip to first unread message

Tommy Chheng

unread,
Feb 13, 2012, 8:17:51 PM2/13/12
to rs...@googlegroups.com
When I issue a delete query, i get this error:

RSolr::Error::InvalidRubyResponse: RSolr::Error::InvalidRubyResponse - 200 OK Error: <result status="0"></result> Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>id:4f0cb8abc61a323cf7000001</query></delete>

The delete went through fine since it's a 200 but the response is an xml. should it be a ruby hash?

matt mitchell

unread,
Feb 13, 2012, 9:58:26 PM2/13/12
to rs...@googlegroups.com
Hey Tommy,

Would you mind posting the code you used? Also, what version are you using?

- Matt

Tommy Chheng

unread,
Feb 14, 2012, 2:22:15 AM2/14/12
to rs...@googlegroups.com
I'm using 1.0.6


def destroy_index_document
RSOLR_OBJ.delete_by_query("id:#{solr_id_value}")
end

where RSOLR_OBJ is a const defined in a rails initializer:
RSOLR_OBJ = RSolr.connect :url => SOLR_URL

Tommy Chheng

unread,
Feb 28, 2012, 5:24:34 PM2/28/12
to rs...@googlegroups.com
Hi,
I'm still seeing this issue, any anyone else seeing this?

Tommy Chheng

unread,
Feb 28, 2012, 5:26:23 PM2/28/12
to rs...@googlegroups.com
Is RSolr expecting the response to be a ruby hash and not an XML format?

Maybe the wt param is not set correctly?

matt mitchell

unread,
Feb 28, 2012, 10:27:58 PM2/28/12
to rs...@googlegroups.com
Hmm, I'm able to use delete_by_query without error. The response I'm getting is:

{"responseHeader"=>{"status"=>0, "QTime"=>0}}

-- that's RSolr 1.0.6, Ruby 1.9.2.

Is it possible for you to look at the Solr logs while running this delete query? What does the solrconfig look like for your update handler?

- Matt

Tommy Chheng

unread,
Feb 29, 2012, 1:16:08 AM2/29/12
to rs...@googlegroups.com
My request handlers are:  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
  <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
  <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler"/>

Tommy Chheng

unread,
Feb 29, 2012, 1:17:39 AM2/29/12
to rs...@googlegroups.com
I guess that is the issue:

Feb 29, 2012 1:43:00 AM org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {deleteByQuery=id:4f4d5ac9c61a3250f9000003} 0 1
Feb 29, 2012 1:43:01 AM org.apache.solr.servlet.SolrUpdateServlet doPost
WARNING: The @Deprecated SolrUpdateServlet does not accept query parameters: wt=ruby
  If you are using solrj, make sure to register a request handler to /update rather then use this servlet.
  Add: <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" > to your solrconfig.xml
Reply all
Reply to author
Forward
0 new messages