okfn/ckan — pull request #674 by amercader (2013-03-20 15:49:49+00:00)
Title: More useful Solr exceptions

Instead of this rather useless message when indexing:
```
2013-03-20 15:14:35,140 ERROR [ckan.lib.search] Error while indexing dataset c85b3834-d251-4158-999b-8714f2ad339c: HTTP code=400, reason=Bad Request
```

Log the details of the Solr response so you can do some actual debugging:
```
2013-03-20 15:24:36,203 ERROR [ckan.lib.search] Error while indexing dataset c85b3834-d251-4158-999b-8714f2ad339c: Solr returned an error: 400 Bad Request -

4002ERROR: [doc=fad36361695b6614afc518db5e62115899ccd3fc] Error adding field 'spatial'='{"type": "Polygon", "coordinates": [[[-133.523868, 31.464947], [-133.523868, 31.481474], [-133.505218, 31.481474], [-133.505218, 31.464947], [-133.523868, 31.464947]]]}' msg=For input string: "{"type": "Polygon""400

```

Also just catch SolrExceptions so other issues can be found