By the way, I used DisMaxRequestHandler in solrconfig.xml. I googled a little about DisMaxRequestHandler, it says that '+' and '-' characters prefixing nonwhitespace characters are treated as "mandatory" and "prohibited" modifiers for the subsequent terms, but it doesn't say anything about just '+' or '-' characters.
Does anyone know a workaround before I stripped off '+'/'-' by myself? Thanks, - Kevin -----Original Message----- From: Kevin Xiao [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 1:14 AM To: solr-user@lucene.apache.org Subject: solr to handle special charater Hi there, I am new to Solr. I used the following analyzer - I tried both WhitespaceTokenizerFactory and StandardTokenizerFactory, but when I search "xyz - abc", it didn't returns anything, ("xyz abc" returns "xyz - abc" though). I used the tokenizer/filter on both index and query time. Is that a solr bug? How do I make it work? Thanks, - Kevin <fieldType name="prefix_token_1" class="solr.TextField" positionIncrementGap="1"> <analyzer type="index"> <!-- <tokenizer class="solr.WhitespaceTokenizerFactory" /> --> <tokenizer class="solr.StandardTokenizerFactory" /> <filter class="solr.LowerCaseFilterFactory" /> <!-- <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="100" /> --> </analyzer> <analyzer type="query"> <!-- <tokenizer class="solr.WhitespaceTokenizerFactory" /> --> <tokenizer class="solr.StandardTokenizerFactory" /> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType>