code: func IndexPluginStatus(data interface{}) map[string][]string {
  	logrus.DefaultLogger().Debug("IndexPluginStatus ", data)
  
  	indexes := map[string][]string{}
  	pluginStatus, ok := data.(*status.PluginStatus)
  	if !ok || pluginStatus == nil {
  		return indexes
  	}
  
  	state := pluginStatus.State
  	if state != 0 {
  		indexes[stateIndexKey] = []string{state.String()}
  	}
  	return indexes
  }
docs: // IndexPluginStatus creates indexes for plugin states and records the state
  // passed as untyped data.