Here is my complete fieldtype:

<fieldType name="name" class="solr.TextField" positionIncrementGap="100">
      <analyzer>
        <charFilter class="solr.HTMLStripCharFilterFactory"/>
        <tokenizer class="solr.PatternTokenizerFactory" pattern="\s|," />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.PatternReplaceFilterFactory" pattern="-"
replacement=""/> 
        <filter class="solr.ASCIIFoldingFilterFactory"/> 
      </analyzer>
    </fieldType>

In the Field Analysis i see that the - is removed by the
patternreplaceFilter. When i escaped the term($q =
SolrUtils::escapeQueryChars($q);) i see in my debugQuery something like
this(term = arsenal - london):

+((DisjunctionMaxQuery((name:arsenal)~1.0) DisjunctionMaxQuery((name:"\
london"~1.0))~2) ()

When i don't escaped the query i get something like this:

+((DisjunctionMaxQuery((name:arsenal)~1.0)
-DisjunctionMaxQuery((name:london)~1.0))~1) ()

The "-" is my term is used by the -DisjunctionMaxQuery. How can i fix this
problem? What is the Easiest way?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/character-in-search-query-tp3168604p3184805.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to