Fix prepareDocsForSolr helper

- prepareDocsForSolr now takes a list of documents to add to Solr and
  formats them into a valid JSON string for addition.