code: func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field, error) {
  	err := validateName(name)
  	if err != nil {
  		return nil, errors.Wrap(err, "validating name")
  	}
  
  	i.mu.Lock()
  	defer i.mu.Unlock()
  
  	// Find field in cache first.
  	if f := i.fields[name]; f != nil {
  		return f, nil
  	}
  
  	// Apply functional options.
  	fo := FieldOptions{}
  	for _, opt := range opts {
  		err := opt(&fo)
  		if err != nil {
  			return nil, errors.Wrap(err, "applying option")
  		}
  	}
  
  	return i.createField(name, fo)
  }
docs: // CreateFieldIfNotExists creates a field with the given options if it doesn't exist.