# Elasticsearch Query String Query | Escaping double quotes

**URL:** <https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917>\
**Category:** Elasticsearch\
**Created:** [March 26, 2019, 12:02pm UTC](https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917 "2019-03-26T12:02:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [March 26, 2019, 12:02pm UTC](https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917/1 "2019-03-26T12:02:43Z")

</div>

Hi,

I am finding difficulties in searching over characters like double quotes using query string query.

I have indexed a single document with the default standard analyzer.

```
{
	"key" : " \" "
}

```

My search query is :

```
{"from" : 0, "size" : 20, "query": {
  
    "bool": {"should": [{
          "query_string": {
            "query":" \" ",
            "fields":["key"]
				}	}
			],"minimum_should_match":1}},"highlight": {
        "type" : "unified",
        
        "fields": {
            "*": { 
            }           	 
        }
    }}

```

This leads to " **search\_phase\_execution\_exception**".  
Even though I have parsed the double quotes in my query using backslash, I am not able to parse it correctly. I can only use query string query and not go with any other queries.  
Am I missing something here?

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [March 27, 2019, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917/2 "2019-03-27T14:40:32Z")

</div>

@elastic

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 27, 2019, 4:48pm UTC](https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917/3 "2019-03-27T16:48:48Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<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:** [April 24, 2019, 4:48pm UTC](https://discuss.elastic.co/t/elasticsearch-query-string-query-escaping-double-quotes/173917/4 "2019-04-24T16:48:51Z")

</div>

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