code: func (f *Field) Open() error {
  	if err := func() error {
  		// Ensure the field's path exists.
  		f.logger.Debugf("ensure field path exists: %s", f.path)
  		if err := os.MkdirAll(f.path, 0777); err != nil {
  			return errors.Wrap(err, "creating field dir")
  		}
  
  		f.logger.Debugf("load meta file for index/field: %s/%s", f.index, f.name)
  		if err := f.loadMeta(); err != nil {
  			return errors.Wrap(err, "loading meta")
  		}
  
  		f.logger.Debugf("load available shards for index/field: %s/%s", f.index, f.name)
  		if err := f.loadAvailableShards(); err != nil {
  			return errors.Wrap(err, "loading available shards")
  		}
  
  		// Apply the field options loaded from meta.
  		f.logger.Debugf("apply options for index/field: %s/%s", f.index, f.name)
  		if err := f.applyOptions(f.options); err != nil {
  			return errors.Wrap(err, "applying options")
  		}
  
  		f.logger.Debugf("open views for index/field: %s/%s", f.index, f.name)
  		if err := f.openViews(); err != nil {
  			return errors.Wrap(err, "opening views")
  		}
  
  		f.logger.Debugf("open row attribute store for index/field: %s/%s", f.index, f.name)
  		if err := f.rowAttrStore.Open(); err != nil {
  			return errors.Wrap(err, "opening attrstore")
  		}
  
  		return nil
  	}(); err != nil {
  		f.Close()
  		return err
  	}
  
  	f.logger.Debugf("successfully opened field index/field: %s/%s", f.index, f.name)
  	return nil
  }
docs: // Open opens and initializes the field.