# Like query not working in string contains &(ampersand)

**URL:** <https://discuss.elastic.co/t/like-query-not-working-in-string-contains-ampersand/44521>\
**Category:** Elasticsearch\
**Created:** [March 16, 2016, 7:54am UTC](https://discuss.elastic.co/t/like-query-not-working-in-string-contains-ampersand/44521 "2016-03-16T07:54:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bony\_Thomas](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@Bony\_Thomas](https://discuss.elastic.co/u/Bony_Thomas)\
**Post date:** [March 16, 2016, 7:54am UTC](https://discuss.elastic.co/t/like-query-not-working-in-string-contains-ampersand/44521/1 "2016-03-16T07:54:05Z")

</div>

Hi friends,  
I have a query which is not working. I think the searched value containing & (ampersand) symbol. I am talking about the following query.

```
    GET "path"_search
    {

      "from": 0,
      "size": 10000,
      "query": {
        "query_string": {
          "query": "(Department_3037.Department_3037_analyzed:*P&C*)"
        }    
      }
    }

```

Why this query is not working and how to overcome this issue or i need like query of string containing & like (p&c) ,l&t etc... Please help me if anyone knows.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Bony\_Thomas](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@Bony\_Thomas](https://discuss.elastic.co/u/Bony_Thomas)\
**Post date:** [March 17, 2016, 7:01am UTC](https://discuss.elastic.co/t/like-query-not-working-in-string-contains-ampersand/44521/2 "2016-03-17T07:01:09Z")

</div>

Please help me............................

---

<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:** [July 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/like-query-not-working-in-string-contains-ampersand/44521/3 "2017-07-05T23:07:38Z")

</div>


