code: func (q *TagQuery) filterIdsFromChan(idCh, resCh chan schema.MKey) {
  	for id := range idCh {
  		var def *idx.Archive
  		var ok bool
  
  		if def, ok = q.byId[id]; !ok {
  			// should never happen because every ID in the tag index
  			// must be present in the byId lookup table
  			corruptIndex.Inc()
  			log.Errorf("memory-idx: ID %q is in tag index but not in the byId lookup table", id)
  			continue
  		}
  
  		// we always omit tag filters because Run() does not support filtering by tags
  		if q.testByAllExpressions(id, def, false) {
  			resCh <- id
  		}
  	}
  
  	q.wg.Done()
  }
docs: // filterIdsFromChan takes a channel of metric ids and runs them through the
  // required tests to decide whether a metric should be part of the final
  // result set or not
  // it returns the final result set via the given resCh parameter