Some of the queries (not all) with special chars return no documents.

Example: queries returning no documents
q=m&m (this can be explained, when I search for "m m", no documents are
returned)
q=o'reilly (when I search for "o reilly", I get documents back)


Queries returning documents:
q=hello&world (document matched is "Hello World: A Life in Ham Radio")


My questions are:
1. What's wrong with "o'reilly"? What changes do I need in my field type?
2. How can I make the query "m&m" work?
My indexe has a bunch of M&M's docs like: "M & M's Milk Chocolate Candy
Coated Peanuts  19.2 oz" and ""M and Ms Chocolate Candies - Peanut - 1 Bag
(42 oz)"


FIeld type:
        <fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">
             <analyzer type="index">
                  <tokenizer class="solr.StandardTokenizerFactory"/>
                  <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
                  <filter class="solr.LowerCaseFilterFactory"/>
                  <filter class="solr.EnglishMinimalStemFilterFactory"/>
                  <filter class="solr.ASCIIFoldingFilterFactory"/>
                  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
            </analyzer>
            <analyzer type="query">
                  <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1"

catenateWords="1"

catenateNumbers="1"

catenateAll="0"

preserveOriginal="1"/>
                  <tokenizer class="solr.StandardTokenizerFactory"/>
                  <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
                  <filter class="solr.LowerCaseFilterFactory"/>
                  <filter class="solr.EnglishMinimalStemFilterFactory"/>
                  <filter class="solr.ASCIIFoldingFilterFactory"/>
                  <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
            </analyzer>
        </fieldType>


-- 
Thanks,
-Utkarsh

Reply via email to