In the unit tests for the jackson json library not all characters noted in 
the ES documentation are tested. Shouldn't ES test the character escaping?

https://github.com/FasterXML/jackson-core/blob/c587db79d6853fe21d56e070a343d018f681575e/src/test/java/com/fasterxml/jackson/core/json/TestParserNonStandard.java

On Thursday, August 21, 2014 10:56:24 AM UTC-7, ben wrote:
>
> In the ES documentation there is a list of reserved characters.
>
> I'm looking for the unit tests that test reserved characters inside a 
> query_string query.
>
> Could someone kindly point me in the right direction?
>
> Thanks!
>
> If you need to use any of the characters which function as operators in 
> your query itself (and not as operators), then you should escape them with 
> a leading backslash. For instance, to search for (1+1)=2, you would need 
> to write your query as \(1\+1\)=2.
>
> The reserved characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? : \ /
>
> Failing to escape these special characters correctly could lead to a 
> syntax error which prevents your query from running.
>
> *Watch this space*
>
> A space may also be a reserved character. For instance, if you have a 
> synonym list which converts "wi fi" to "wifi", a query_string search for "wi 
> fi" would fail. The query string parser would interpret your query as a 
> search for "wi OR fi", while the token stored in your index is actually 
> "wifi". Escaping the space will protect it from being touched by the 
> query string parser: "wi\ fi".
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/5c0d5fe8-d3de-4be8-bb90-f65cc223084b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to