Question Mark search in Elasticsearch


(vijuitech) #1

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


(lyes zaiko) #2

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 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


(vijuitech) #3

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 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 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


(lyes zaiko) #4

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 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 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
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


(vijuitech) #5

ok.Thank you so much :slight_smile:

cheers

George

On Mar 30, 5:11 pm, Lyes zaiko 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 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 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
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


(system) #6