: > Is there a list of possible other statuscodes you can receive in case
: > anything fails and what these errorcodes mean?
: 
: I don't think we have a list of possible other status because Solr
: doen't return status other than 0. Instead of status code in XML,
: you should look at HTTP status code e.g. 200 OK, 404 Not Found, etc.

To elaborate:  the "status" value included in the response was 
historically (in the way, way early days of Solr) similar to a process 
result code in unix: 0 ment everything was fine, and non-zero ment bad 
things had happened.

we later standardized on using http status codes -- both in the HTTP 
header responses, but also in the "responseHeader" of the 
xml/json/whatever response body - but for backcompat with existing clients 
"0" is still used in the body (instead of "200") when teh result is a 
"success"...


$ curl -sS -D - "http://localhost:8983/solr/select?q=foo&df=text";
HTTP/1.1 200 OK
...
<lst name="responseHeader"><int name="status">0</int>...


hossman@frisbee:~/lucene/dev/solr$ curl -sS -D - 
"http://localhost:8983/solr/select?q=foo&df=does_not_exist";
HTTP/1.1 400 Bad Request
...
<lst name="responseHeader"><int name="status">400</int>...


-Hoss
http://www.lucidworks.com/

Reply via email to