'Send things to solr. Return value is time elapsed, in seconds,
of the communication with the solr endpoint'

def inject(self, quiet=False):

    xml_things = self.xml_from_things()
    cs_time = 0
    for batch in xml_things:
        cs_start = datetime.now(g.tz)
        sent = self.send_documents(batch)
        cs_time = (cs_time + (datetime.now(g.tz) - cs_start).total_seconds())
        (adds, deletes, warnings) = (0, 0, [])
        for record in sent:
            response = etree.fromstring(record)
            status = response.find(STATUS_XPATH).text
            if (status == '0'):
                adds += len(batch.findall('doc'))
                deletes += len(batch.findall('delete'))
                for w in (response.find(WARNING_XPATH) or []):
                    warnings.append(w.text)
        g.stats.simple_event('solrsearch.uploads.adds', delta=adds)
        g.stats.simple_event('solrsearch.uploads.deletes', delta=deletes)
        g.stats.simple_event('solrsearch.uploads.warnings', delta=len(warnings))
        if (not quiet):
            print ('%s    Changes:    +%i    -%i' % (self.__class__.__name__, adds, deletes))
            if len(warnings):
                print ('%s    Warnings:    %s' % (self.__class__.__name__, ';    '.join(warnings)))
    return cs_time
