code: func (m *UnpartitionedMemoryIdx) Tags(orgId uint32, filter string, from int64) ([]string, error) {
  	if !TagSupport {
  		log.Warn("memory-idx: received tag query, but tag support is disabled")
  		return nil, nil
  	}
  
  	var re *regexp.Regexp
  	if len(filter) > 0 {
  		if filter[0] != byte('^') {
  			filter = "^(?:" + filter + ")"
  		}
  		var err error
  		re, err = regexp.Compile(filter)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	m.RLock()
  	defer m.RUnlock()
  
  	tags, ok := m.tags[orgId]
  	if !ok {
  		return nil, nil
  	}
  
  	var res []string
  
  	// if there is no filter/from given we know how much space we'll need
  	// and can preallocate it
  	if re == nil && from == 0 {
  		res = make([]string, 0, len(tags))
  	}
  
  	for tag := range tags {
  		// filter by pattern if one was given
  		if re != nil && !re.MatchString(tag) {
  			continue
  		}
  
  		// if from is > 0 we need to find at least one metric definition where
  		// LastUpdate >= from before we add the tag to the result set
  		if (from > 0 && m.hasOneMetricFrom(tags, tag, from)) || from == 0 {
  			res = append(res, tag)
  		}
  	}
  
  	return res, nil
  }
docs: // Tags returns a list of all tag keys associated with the metrics of a given
  // organization. The return values are filtered by the regex in the second parameter.
  // If the third parameter is >0 then only metrics will be accounted of which the
  // LastUpdate time is >= the given value.