Adding documents

This adds the document with id=123, name="foobar" and author="xyzzy".
The document record is semantically an unordered collection of named
fields; you can pass an alist or a hashtable as a record. Field names
are represented by keywords. Field values are mapped as follows:

It returns LXML, a S-expression representaton of XML. It's up
to the caller to extract necessary information from the returned
LXML, but we provide a few convenience procedures for some
basic extraction.

(solr-result->response-count lxml)

This returns three values: the total number of matching documents, the
starting record number, and the number of documents included in the
response. Note that Solr does pagenation by default--if you don't
pass the :rows keyword it will only return the first 10 matching
records. To retrieve other documents you need to pass the :start
keyword to solr-query.

Information on matching documents is in :doc XML elements.

(solr-result->doc-nodes lxml)

This procedure extracts and returns the list of doc elements,
on which you can map to dig further information.

The extracted doc elements are still LXML. The following procedure
further converts the field values to Lisp objects according to the
LXML attributes:

(solr-result->doc-alist lxml)

Error handling

When the Solr server returns an error (e.g. invalid query format), a
condition solr-error is raised. It contains the Solr response status
code, response headers and response body. The response body is in
LXML.

When the API failed to communicate with Solr server (e.g. the server
isn't running), a socket-error condition is raised.