# Parse exceptionin querystring

**URL:** <https://discuss.elastic.co/t/parse-exceptionin-querystring/125562>\
**Category:** Elasticsearch\
**Created:** [March 26, 2018, 8:17am UTC](https://discuss.elastic.co/t/parse-exceptionin-querystring/125562 "2018-03-26T08:17:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckant](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@ckant](https://discuss.elastic.co/u/ckant)\
**Post date:** [March 26, 2018, 8:17am UTC](https://discuss.elastic.co/t/parse-exceptionin-querystring/125562/1 "2018-03-26T08:17:29Z")

</div>

The following query  
`{
"query": {
"query_string": {
"query": "content_type:application/pdf",
"analyze_wildcard": true,
"minimum_should_match": "1"
}
}
}
`

gives me following parse exception :  
**Cannot parse 'content\_type:application/pdf': Lexical error at line 1, column 29. Encountered: after : "/pdf"**

This is the full log :  
{  
"error" : {  
"root\_cause" : [ {  
"type" : "query\_parsing\_exception",  
"reason" : "Failed to parse query [content\_type:application/pdf]",  
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5\_.archive.av4",  
"line" : 1,  
"col" : 135  
} ],  
"type" : "search\_phase\_execution\_exception",  
"reason" : "all shards failed",  
"phase" : "query",  
"grouped" : true,  
"failed\_shards" : [ {  
"shard" : 0,  
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5\_.archive.av4",  
"node" : "Cd\_WR8F2SnmziLLbHAa8Jw",  
"reason" : {  
"type" : "query\_parsing\_exception",  
"reason" : "Failed to parse query [content\_type:application/pdf]",  
"index" : "79073282-6371-4282-a3f3-5ff5775b4bf5\_.archive.av4",  
"line" : 1,  
"col" : 135,  
"caused\_by" : {  
"type" : "parse\_exception",  
"reason" : "Cannot parse 'content\_type:application/pdf': Lexical error at line 1, column 29. Encountered: after : "/pdf"",  
"caused\_by" : {  
"type" : "token\_mgr\_error",  
"reason" : "Lexical error at line 1, column 29. Encountered: after : "/pdf""  
}  
}  
}  
} ]  
},  
"status" : 400  
}

anybody knows why ?

Thanks

---

<div class="post-metadata">

**Author:** ![ckant](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@ckant](https://discuss.elastic.co/u/ckant)\
**Post date:** [March 26, 2018, 8:45am UTC](https://discuss.elastic.co/t/parse-exceptionin-querystring/125562/2 "2018-03-26T08:45:37Z")

</div>

the issue was about escaping / character. its fixed

---

<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 23, 2018, 8:45am UTC](https://discuss.elastic.co/t/parse-exceptionin-querystring/125562/3 "2018-04-23T08:45:40Z")

</div>

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