code: static void addDocuments(SolrClient client, List<SolrInputDocument> documents, boolean commit)
      throws IOException, SolrServerException {
  
          if ((null == client) || (null == documents)) {
              return;
          }
  
          if (!documents.isEmpty()) {
              client.add(documents);
          }
  
          if (commit) {
              client.commit();
          }
      }
docs: Add a list of documents to the Solr client.<p>
  
  @param client The SolrClient instance object.
  @param documents The documents that should be added.
  @param commit boolean flag indicating whether a "commit" call should be made after adding the documents
  
  @throws IOException in case something goes wrong
  @throws SolrServerException in case something goes wrong