# & / = / ? in blacklist exclusions

**URL:** <https://discuss.elastic.co/t/in-blacklist-exclusions/263888>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [February 10, 2021, 3:23pm UTC](https://discuss.elastic.co/t/in-blacklist-exclusions/263888 "2021-02-10T15:23:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoveland](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shoveland/32/83724_2.png) [@shoveland](https://discuss.elastic.co/u/shoveland)\
**Post date:** [February 10, 2021, 3:23pm UTC](https://discuss.elastic.co/t/in-blacklist-exclusions/263888/1 "2021-02-10T15:23:57Z")

</div>

In our search instance we have quite a few pages that contain some parameters for returning to a product page. As an example a category page might exist of `/category` with an identical page that contained a link for "return to {PRODUCT NAME}" that is pulled off of a URL param similar to `/category?li=12345&pi=987654`.

I made an exclusion for these as they provide very little value to a search user as a rule to exclude content that contains `&pi=`. However on recrawl it seems that the exclusion rule excluded everything containing `pi` and ignored the `&` and `=` in the rule which lead to a TON of unintended exclusions. Is this expected behavior? Is there a workaround for this?

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [February 15, 2021, 9:58pm UTC](https://discuss.elastic.co/t/in-blacklist-exclusions/263888/2 "2021-02-15T21:58:13Z")

</div>

Hey Seth,

Sorry for the delay. I'm going to reach out to somebody who knows how this should be working. It's possible you may need to use a [_match regex_ rule](https://swiftype.com/documentation/site-search/crawler-configuration/content-inclusion-exclusion#blacklist) instead of the usual _contain_ rule in order to work with special characters, but I'll confirm.

Ross

---

<div class="post-metadata">

**Author:** ![Brian\_McGue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_mcgue/32/63366_2.png) [@Brian\_McGue](https://discuss.elastic.co/u/Brian_McGue)\
**Post date:** [February 17, 2021, 4:31am UTC](https://discuss.elastic.co/t/in-blacklist-exclusions/263888/3 "2021-02-17T04:31:52Z")

</div>

Hi @shoveland,

I tried the replicate this with my own setup and I didn't get the same results. For me, only URLs with `&pi=` were excluded and other URLs containing just `pi` stuck around in the engine.

I would suggest writing into the Elastic Site Search/Swiftype Support team. With more information about your account, we'll be able to better dig into your specific issue.

Sorry I couldn't be more helpful!  
Brian

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2021, 4:32am UTC](https://discuss.elastic.co/t/in-blacklist-exclusions/263888/4 "2021-03-17T04:32:06Z")

</div>

Closed on March 17, 2021, 4:32am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
