Hi,
I have a field that is not tokenized. Its value can contain a "-".
For instance it could be "project-test". I have read that I need to escape
this special character with a \
I am using the following code (StandardAnanyzer):
Query query = queryParser.parse("field:project\\-test);
and it doesn't retrieve my document.
Is it because I need to use a TermQuery?
I have tried with a TermQuery and it seems that in this case I don't need to
escape the "-".
Or is it because of the analyzer?
Any help will be appreciated. Thanks a lot,
Anne
--
View this message in context:
http://lucene.472066.n3.nabble.com/Escaping-special-character-tp3432118p3432118.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]