Yes, other special (punctuation) characters will be preserved by the white space analyzer, but must be escaped in query strings. You will have to manually escape them with a backslash, since the QueryParser.escape method will escape asterisk as well, which would disable wildcard query.

-- Jack Krupansky

-----Original Message----- From: saisantoshi
Sent: Sunday, October 20, 2013 7:43 PM
To: java-user@lucene.apache.org
Subject: Re: Handling special characters in Lucene 4.0

what about other characters like '&,'( quote) characters. We have a
requirement that a text can start with 'sampletext' and when I search with a
'* it does not return any results but instead when I search with sample*, it
does return the result.

Thanks,
Ranjith,



--
View this message in context: http://lucene.472066.n3.nabble.com/Handling-special-characters-in-Lucene-4-0-tp4096674p4096732.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to