code: func (ix *Index) commit(mm *mutationMap) error {
  	// We want the update of the deletes cache to be atomic
  	// with the transaction commit, so we lock here instead
  	// of within updateDeletesCache.
  	ix.deletes.Lock()
  	defer ix.deletes.Unlock()
  	bm := ix.s.BeginBatch()
  	for k, v := range mm.kv {
  		bm.Set(k, v)
  	}
  	err := ix.s.CommitBatch(bm)
  	if err != nil {
  		return err
  	}
  	for _, cl := range mm.deletes {
  		if err := ix.updateDeletesCache(cl); err != nil {
  			return fmt.Errorf("Could not update the deletes cache after deletion from %v: %v", cl, err)
  		}
  	}
  	return nil
  }
docs: // commit writes the contents of the mutationMap on a batch
  // mutation and commits that batch. It also updates the deletes
  // cache.