# Question Mark search in Elasticsearch

**URL:** <https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175>\
**Category:** Elasticsearch\
**Created:** [March 30, 2012, 9:55am UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175 "2012-03-30T09:55:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [March 30, 2012, 9:55am UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/1 "2012-03-30T09:55:22Z")

</div>

Hi,  
I have a following set of text in the Index,  
Eg:  
" abc def ???????????? ghi klm ?????"

While I was searching the ???????(question mark" it is not gets  
searched. Is there any method in elasticsearch to search this?

Cheers!

George

---

<div class="post-metadata">

**Author:** ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)\
**Post date:** [March 30, 2012, 10:30am UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/2 "2012-03-30T10:30:35Z")

</div>

Try to escape the question mark in your query string, like this "?"

On Fri, Mar 30, 2012 at 10:55 AM, George Viju [vijuitech@gmail.com](mailto:vijuitech@gmail.com) wrote:

> Hi,  
> I have a following set of text in the Index,  
> Eg:  
> " abc def ???????????? ghi klm ?????"
> 
> While I was searching the ???????(question mark" it is not gets  
> searched. Is there any method in elasticsearch to search this?
> 
> Cheers!
> 
> George

---

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [March 30, 2012, 12:03pm UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/3 "2012-03-30T12:03:28Z")

</div>

Thank you Lyes Zaiko. Is there any method to search the question  
mark in elasticsearch?

cheers!!

George

On Mar 30, 3:30 pm, Lyes zaiko [lyes...@gmail.com](mailto:lyes...@gmail.com) wrote:

> Try to escape the question mark in your query string, like this "?"
> 
> On Fri, Mar 30, 2012 at 10:55 AM, George Viju [vijuit...@gmail.com](mailto:vijuit...@gmail.com) wrote:
> 
> > Hi,  
> > I have a following set of text in the Index,  
> > Eg:  
> > " abc def ???????????? ghi klm ?????"
> 
> > While I was searching the ???????(question mark" it is not gets  
> > searched. Is there any method in elasticsearch to search this?
> 
> > Cheers!
> 
> > George

---

<div class="post-metadata">

**Author:** ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)\
**Post date:** [March 30, 2012, 12:11pm UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/4 "2012-03-30T12:11:27Z")

</div>

The question mark is a special character in es query strings. For example,  
if you search "me?t", this means that the results we seek must contain a  
word that contain "At Most" one character between "me" and "t". So the  
words "meet", "meat" or "met" will match the query.

so if you want that the "?" character won't be interpretated in your  
quesry, you must escape it.

On Fri, Mar 30, 2012 at 1:03 PM, George Viju [vijuitech@gmail.com](mailto:vijuitech@gmail.com) wrote:

> Thank you Lyes Zaiko. Is there any method to search the question  
> mark in elasticsearch?
> 
> cheers!!
> 
> George
> 
> On Mar 30, 3:30 pm, Lyes zaiko [lyes...@gmail.com](mailto:lyes...@gmail.com) wrote:
> 
> > Try to escape the question mark in your query string, like this "?"
> > 
> > On Fri, Mar 30, 2012 at 10:55 AM, George Viju [vijuit...@gmail.com](mailto:vijuit...@gmail.com)  
> > wrote:
> > 
> > > Hi,  
> > > I have a following set of text in the Index,  
> > > Eg:  
> > > " abc def ???????????? ghi klm ?????"
> > 
> > > While I was searching the ???????(question mark" it is not gets  
> > > searched. Is there any method in elasticsearch to search this?
> > 
> > > Cheers!
> > 
> > > George

---

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [March 30, 2012, 12:40pm UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/5 "2012-03-30T12:40:53Z")

</div>

ok.Thank you so much 🙂

cheers

George

On Mar 30, 5:11 pm, Lyes zaiko [lyes...@gmail.com](mailto:lyes...@gmail.com) wrote:

> The question mark is a special character in es query strings. For example,  
> if you search "me?t", this means that the results we seek must contain a  
> word that contain "At Most" one character between "me" and "t". So the  
> words "meet", "meat" or "met" will match the query.
> 
> so if you want that the "?" character won't be interpretated in your  
> quesry, you must escape it.
> 
> On Fri, Mar 30, 2012 at 1:03 PM, George Viju [vijuit...@gmail.com](mailto:vijuit...@gmail.com) wrote:
> 
> > Thank you Lyes Zaiko. Is there any method to search the question  
> > mark in elasticsearch?
> 
> > cheers!!
> 
> > George
> 
> > On Mar 30, 3:30 pm, Lyes zaiko [lyes...@gmail.com](mailto:lyes...@gmail.com) wrote:
> > 
> > > Try to escape the question mark in your query string, like this "?"
> 
> > > On Fri, Mar 30, 2012 at 10:55 AM, George Viju [vijuit...@gmail.com](mailto:vijuit...@gmail.com)  
> > > wrote:
> > > 
> > > > Hi,  
> > > > I have a following set of text in the Index,  
> > > > Eg:  
> > > > " abc def ???????????? ghi klm ?????"
> 
> > > > While I was searching the ???????(question mark" it is not gets  
> > > > searched. Is there any method in elasticsearch to search this?
> 
> > > > Cheers!
> 
> > > > George

---

<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, 3:34am UTC](https://discuss.elastic.co/t/question-mark-search-in-elasticsearch/7175/6 "2017-07-06T03:34:06Z")

</div>


