code: func (p *PartitionedMemoryIdx) TagDetails(orgId uint32, key string, filter string, from int64) (map[string]uint64, error) {
  	g, _ := errgroup.WithContext(context.Background())
  	result := make([]map[string]uint64, len(p.Partition))
  	var i int
  	for _, m := range p.Partition {
  		pos, m := i, m
  		g.Go(func() error {
  			found, err := m.TagDetails(orgId, key, filter, from)
  			if err != nil {
  				return err
  			}
  			result[pos] = found
  			return nil
  		})
  		i++
  	}
  	if err := g.Wait(); err != nil {
  		log.Errorf("memory-idx: failed to get TagDetails: orgId=%d key=%s filter=%s from=%d. %s", orgId, key, filter, from, err)
  		return nil, err
  	}
  
  	// merge our results into the unique set of tags
  	merged := map[string]uint64{}
  	for _, tagCounts := range result {
  		for tag, count := range tagCounts {
  			merged[tag] = merged[tag] + count
  		}
  	}
  
  	return merged, nil
  }
docs: // TagDetails returns a list of all values associated with a given tag key in the
  // given org. The occurrences of each value is counted and the count is referred to by
  // the metric names in the returned map.
  // If the third parameter is not "" it will be used as a regular expression to filter
  // the values before accounting for them.
  // If the fourth parameter is > 0 then only those metrics of which the LastUpdate
  // time is >= the from timestamp will be included.