# Trying again for query on "?"

**URL:** <https://discuss.elastic.co/t/trying-again-for-query-on/20844>\
**Category:** Elasticsearch\
**Created:** [November 19, 2014, 7:06pm UTC](https://discuss.elastic.co/t/trying-again-for-query-on/20844 "2014-11-19T19:06:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Shetti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bill_shetti/32/1084_2.png) [@Bill\_Shetti](https://discuss.elastic.co/u/Bill_Shetti)\
**Post date:** [November 19, 2014, 7:06pm UTC](https://discuss.elastic.co/t/trying-again-for-query-on/20844/1 "2014-11-19T19:06:10Z")

</div>

Hi,

I posted an earlier note on looking for "?" properly but didn't receive a  
response. I am trying again.

[https://groups.google.com/forum/?utm\_medium=email&utm\_source=footer#!msg/elasticsearch/od2ip65toMo/f-Ss6I1AXZ4J](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/elasticsearch/od2ip65toMo/f-Ss6I1AXZ4J)

Essentially, I need to query for a string "?confid" but I tried the  
following:

[root@node4 logstash]# curl -XGET '  
[http://localhost:9200/logstash-2014.11.16/\_search?pretty](http://localhost:9200/logstash-2014.11.16/_search?pretty)' -d '

{

"query": {

"filtered":{

```
 "filter": {

   "term": { "message":"?confid"}

  }

}

```

}

}'

No response, I tried

curl -XGET  
'[http://localhost:9200/logstash-2014.11.16/nginx\_access/\_search?pretty](http://localhost:9200/logstash-2014.11.16/nginx_access/_search?pretty)' -d '  
{  
"query":{  
"match\_phrase":{ "rom": "?confid"}  
}  
}'

I get an error

"error" : "SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed; shardFailures  
{[NvvTH0l6Qmag49B\_Muybyw][logstash-2014.11.16][0]:  
SearchParseException[[logstash-2014.11.16][0]: from[-1],size[-1]: Parse  
Failure [Failed to parse source [\n{\n "query":{\n  
"match\_phrase":{ "rom": "\?confid"}\n }\n}]]]; nested:  
QueryParsingException[[logstash-2014.11.16] Failed to parse]; nested:  
JsonParseException[Unrecognized character escape '?' (code 63)\n at  
[Source: [B@21cf628a; line: 4, column: 33]];  
}{[NvvTH0l6Qmag49B\_Muybyw][logstash-2014.11.16][1]:  
SearchParseException[[logstash-2014.11.16][1]: from[-1],size[-1]: Parse  
Failure [Failed to parse source [\n{\n "query":{\n  
"match\_phrase":{ "rom": "\?confid"}\n }\n}]]]; nested:  
QueryParsingException[[logstash-2014.11.16] Failed to parse]; nested:  
JsonParseException[Unrecognized character escape '?' (code 63)\n at  
[Source: [B@21cf628a; line: 4, column: 33]];  
}{[NvvTH0l6Qmag49B\_Muybyw][logstash-2014.11.16][2]:  
SearchParseException[[logstash-2014.11.16][2]: from[-1],size[-1]: Parse  
Failure [Failed to parse source [\n{\n "query":{\n  
"match\_phrase":{ "rom": "\?confid"}\n }\n}]]]; nested:  
QueryParsingException[[logstash-2014.11.16] Failed to parse]; nested:  
JsonParseException[Unrecognized character escape '?' (code 63)\n at  
[Source: [B@21cf628a; line: 4, column: 33]];  
}{[NvvTH0l6Qmag49B\_Muybyw][logstash-2014.11.16][3]:  
SearchParseException[[logstash-2014.11.16][3]: from[-1],size[-1]: Parse  
Failure [Failed to parse source [\n{\n "query":{\n  
"match\_phrase":{ "rom": "\?confid"}\n }\n}]]]; nested:  
QueryParsingException[[logstash-2014.11.16] Failed to parse]; nested:  
JsonParseException[Unrecognized character escape '?' (code 63)\n at  
[Source: [B@21cf628a; line: 4, column: 33]];  
}{[NvvTH0l6Qmag49B\_Muybyw][logstash-2014.11.16][4]:  
SearchParseException[[logstash-2014.11.16][4]: from[-1],size[-1]: Parse  
Failure [Failed to parse source [\n{\n "query":{\n  
"match\_phrase":{ "rom": "\?confid"}\n }\n}]]]; nested:  
QueryParsingException[[logstash-2014.11.16] Failed to parse]; nested:  
JsonParseException[Unrecognized character escape '?' (code 63)\n at  
[Source: [B@21cf628a; line: 4, column: 33]]; }]",  
"status" : 400  
}

Thanks.  
BIll

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2fc7dd35-032b-41d9-9e46-a53b2dab1f9c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2fc7dd35-032b-41d9-9e46-a53b2dab1f9c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:48am UTC](https://discuss.elastic.co/t/trying-again-for-query-on/20844/2 "2017-07-06T00:48:57Z")

</div>


