You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Nina Khosravi <kh...@us.ibm.com> on 2005/10/20 20:35:29 UTC
StandardFilter - can I escape certain chars (such as * and ?)
Hello
I am building a search api that will search against content that was
indexed using the StandardAnalyzer. I am trying to simulate the same
filtering that occurs when the index was created on the search string. I
am using the StandardTokenizer and StopFilter. The problem I'm
encountering is that the StandardTokenizer removes the Lucene special
characters such as the wildcard char, *, and ?. Is there a way to exclude
which characters are stripped out when I use either the StandardTokenizer
or StandardFilter. I want to retain the Lucene special chars.
I guess my other option is to not use the StandardFilter but strip out the
special characters myself. I need to build a special query that is similar
to what MultiTermQueryParser gives you but with some changes that is why I
am analyzing the input myself to build the query myself.
Regards,
Nina Khosravi