code: func (cfg IndexConfig) ToKeywords(v interface{}) ([]Keyword, error) {
  	var (
  		keywords []Keyword
  		toLower  = cfg.ToLower
  	)
  	switch vv := v.(type) {
  	case string:
  		if toLower {
  			vv = strings.ToLower(vv)
  		}
  		keywords = append(keywords, StringKeyword(vv))
  	case []string:
  		if toLower {
  			for i := 0; i < len(vv); i++ {
  				vv[i] = strings.ToLower(vv[i])
  			}
  		}
  		keywords = append(keywords, StringsToKeywords(vv...)...)
  	case time.Time:
  		layout := "2006"
  		if cfg.Pattern != "" {
  			layout = cfg.Pattern
  		}
  		keywords = append(keywords, StringKeyword(vv.Format(layout)))
  	case nil:
  		return keywords, nil
  	default:
  		return keywords, fmt.Errorf("indexing currently not supported for index %q and type %T", cfg.Name, vv)
  	}
  
  	return keywords, nil
  }
docs: // ToKeywords returns a Keyword slice of the given input.