code: func (i *Index) Close() error {
  	// Lock index and close partitions.
  	i.mu.Lock()
  	defer i.mu.Unlock()
  
  	for _, p := range i.partitions {
  		if err := p.Close(); err != nil {
  			return err
  		}
  	}
  
  	// Mark index as closed.
  	i.opened = false
  	return nil
  }
docs: // Close closes the index.