Illegal Characters?


(bailey) #1

Hi All -

Is there a list of characters that are "illegal" in query strings?

For example, I'm seeing errors when I perform the following search:

{
"query":
{
"field" :
{
"username" : "hello{World"
}
}
}

It appears the bracket is what is causing the error. I also noticed a
parenthesis will cause the same errors.

Thanks.


(Clinton Gormley) #2

Hiya

Is there a list of characters that are "illegal" in query strings?

It's not so much that characters are illegal, as that they have a
certain meaning:

See http://lucene.apache.org/java/3_0_0/queryparsersyntax.html
and especially:

http://lucene.apache.org/java/3_0_0/queryparsersyntax.html#Escaping%20Special%20Characters

clint


(bailey) #3

Great.
Thanks for pointing out those links.
I was hoping this was the case.

Cheers!

On Sep 2, 12:45 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

Hiya

Is there a list of characters that are "illegal" in query strings?

It's not so much that characters are illegal, as that they have a
certain meaning:

Seehttp://lucene.apache.org/java/3_0_0/queryparsersyntax.html
and especially:

http://lucene.apache.org/java/3_0_0/queryparsersyntax.html#Escaping%2...

clint


(system) #4