The standard analyzer should remove those ampersands and pluses, so the core
alpha terms should be matched. You would need to use the white space
analyzer or a custom analyzer to preserve such special characters.
Please give a specific indexed text string and a specific query that fails
against it.
Also, QueryParser.escape will also escape asterisks, so they won't perform
wildcard query. And then the standard analyzer will remove the asterisks as
it does with most punctuation. If you switch to an analyzer that preserves
special characters, you can then manually escape special characters with a
backslash, and then leave the asterisk unescaped to perform a wildcard
query.
-- Jack Krupansky
-----Original Message-----
From: saisantoshi
Sent: Sunday, October 20, 2013 6:02 PM
To: java-user@lucene.apache.org
Subject: Re: Handling special characters in Lucene 4.0
StandardAnalyzer both at index and search time. We use the default one and
don't have any custom analyzers.
Thanks,
Sai
--
View this message in context:
http://lucene.472066.n3.nabble.com/Handling-special-characters-in-Lucene-4-0-tp4096674p4096710.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