code: def commit(self, softCommit=False, waitFlush=None, waitSearcher=None, expungeDeletes=None, handler='update'):
          
          if expungeDeletes is not None:
              msg = '<commit expungeDeletes="%s" />' % str(bool(expungeDeletes)).lower()
          else:
              msg = '<commit />'
  
          return self._update(msg, commit=not softCommit, softCommit=softCommit, waitFlush=waitFlush, waitSearcher=waitSearcher,
                              handler=handler)
docs: Forces Solr to write the index data to disk.
  
          Optionally accepts ``expungeDeletes``. Default is ``None``.
  
          Optionally accepts ``waitFlush``. Default is ``None``.
  
          Optionally accepts ``waitSearcher``. Default is ``None``.
  
          Optionally accepts ``softCommit``. Default is ``False``.
  
          Usage::
  
              solr.commit()