The problem is that query string use the lucene syntax and "!" is a special characters, that you need to escape.
Lucene supports escaping special characters that are part of the query syntax. The current list special characters are
- && || ! ( ) { } ^ " ~ * ? : \
http://lucene.apache.org/core/3_4_0/queryparsersyntax.html#Escaping%20Special%20Characters
Here a similar discussion: