# Search by Tags

**URL:** https://forum.mautic.org/t/search-by-tags/5254
**Category:** Product Support
**Created:** [September 7, 2016, 5:33pm UTC](https://forum.mautic.org/t/search-by-tags/5254 "2016-09-07T17:33:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ethanzinho](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@ethanzinho](https://forum.mautic.org/u/ethanzinho)
#### Post date: [September 7, 2016, 5:33pm UTC](https://forum.mautic.org/t/search-by-tags/5254/1 "2016-09-07T17:33:52Z")

</div>

I’m uploading lists (CSV) and added tags using Mautic to some of them so that I could find particular users within each segment. But now I can’t find any way to find or filter contacts by tags (already tried searching for **tag:\*** , but no luck).  
  
  
  
If there any way to find these contacts?  
  
  
  
Also, in the future will there be a way to give points based on acquisition of someone with a certain tag?  
  
  
  
Thanks ahead of time for your help!

---

<div class="post-metadata">

### Author: ![ethanzinho](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@ethanzinho](https://forum.mautic.org/u/ethanzinho)
#### Post date: [September 7, 2016, 5:33pm UTC](https://forum.mautic.org/t/search-by-tags/5254/2 "2016-09-07T17:33:52Z")

</div>

I’m uploading lists (CSV) and added tags using Mautic to some of them so that I could find particular users within each segment. But now I can’t find any way to find or filter contacts by tags (already tried searching for tag:\*, but no luck).

If there any way to find these contacts?

Also, in the future will there be a way to give points based on acquisition of someone with a certain tag?

Thanks ahead of time for your help!

---

<div class="post-metadata">

### Author: ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)
#### Post date: [September 8, 2016, 7:00am UTC](https://forum.mautic.org/t/search-by-tags/5254/3 "2016-09-08T07:00:56Z")

</div>

There was a complaint about search by tag before ( [https://github.com/mautic/mautic/pull/2416#issuecomment-243460282](https://github.com/mautic/mautic/pull/2416#issuecomment-243460282) ). It seems like a bug. Please, create a new issue here: [https://github.com/mautic/mautic/issues](https://github.com/mautic/mautic/issues)

---

<div class="post-metadata">

### Author: ![stan74](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@stan74](https://forum.mautic.org/u/stan74)
#### Post date: [September 8, 2016, 5:10pm UTC](https://forum.mautic.org/t/search-by-tags/5254/4 "2016-09-08T17:10:19Z")

</div>

i had the same issue

i use this quick and dirty solution

i use the code in the Lead Repository.php from version 2.1.0 and it works again

replace with the following code: (its easy to find the right place)

`case $this->translator->trans('mautic.lead.lead.searchcommand.tag'):
                // search by tag
                $sq = $this->_em->getConnection()->createQueryBuilder();
                $sq->select('x.lead_id')
                    ->from(MAUTIC_TABLE_PREFIX.'lead_tags_xref', 'x')
                    ->join('x', MAUTIC_TABLE_PREFIX.'lead_tags', 't', 'x.tag_id = t.id')
                    ->where(
                        $sq->expr()->$eqFunc('t.tag', ":$unique")
                    )
                    ->setParameter($unique, $string);
                $results = $sq->execute()->fetchAll();
                $leadIds = array();
                foreach ($results as $row) {
                    $leadIds[] = $row['lead_id'];
                }
                if (!count($leadIds)) {
                    $leadIds[] = 0;
                }
                $expr = $q->expr()->in('l.id', $leadIds);
                break;`
