lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Solr::Connection.add XML responses and Solr::Response::Xml
Date Tue, 12 Jun 2007 20:37:03 GMT

I'm using the trunk version of Solr and getting this response from  
posting one of the example files:

$ curl http://localhost:8983/solr/update --data-binary @solr.xml  -H  
<?xml version="1.0" encoding="UTF-8"?>
<lst name="responseHeader"><int name="status">0</int><int  

Are you perhaps using an older solrconfig.xml file?   Try using the  
one from the Solr example configuration and see if that changes  
things for you.


On Jun 12, 2007, at 3:23 PM, Aaron Suggs wrote:

> Hi all,
> The XML response that Solr returns after successfully adding documents
> to the index appears to differ from the response solr-ruby expects.
> Solr version 1.1 and 1.2 return the following XML snippet after
> successfully indexing a document:
> <result status="0"></result>
> However, solr-ruby's Solr::Response::Xml class expects something along
> the lines of:
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">2</int></lst>
> </response>
> (see the comments in solr/response/xml.rb)
> Since Solr's XML response differs from what solr-ruby expects, the
> Solr::Connection.add returns false, even though the document was
> committed successfully.
> While trying to track down where things diverged, I see the following
> in Solr 1.1's changelog:
> "The XML response format when adding multiple documents to the  
> collection
> in a single <add> command has changed to return a single <result>."
> Is it a bug/misconfiguration on my part that Solr is returning
> unexpected XML; or is solr-ruby expecting the wrong response?
> Cheers,
> Aaron Suggs

View raw message