I am trying to do a simple mapping of a 2 word term to a 1 word term and
it does not work. See my configuration at the bottom of the email. My
scenario is that I have a term called "pond care" and I want to map it
to the term "fountain".  So whenever a user enters the term "pond care"
in the search box, I want Solr to search on the word "fountain".
Searching on  "fountain" or "pond food" should returns the same number
of products.  I try all type of filter combination and cannot get it to
work.  I use the Solr analysis and "pond food" does map to "fountain"
but when test on Solr Admin, the search would not query on "fountain"
but only on "pond care".  Here is my log from solr Admin search:

- <lst name="debug">
- <lst name="queryBoosting">
  <str name="q">fountain</str> 
  <null name="match" /> 
  </lst>
  <str name="rawquerystring">pond food</str> 
  <str name="querystring">pond food</str> 
  <str name="parsedquery">+text:pond +text:food</str> 
  <str name="parsedquery_toString">+text:pond +text:food</str> 
- <lst name="explain">
  <str name="catalogItem.155.120.1">1.4865229 = (MATCH) sum of:
0.5013988 = (MATCH) weight(text:pond in 1137), product of: 0.5317582 =
queryWeight(text:pond), product of: 3.180518 = idf(docFreq=730,
maxDocs=6470) 0.16719232 = queryNorm 

I am new to Solr and I have Google the issue but I did not find a
solution that will work for my case.  Please let me know if you  have
encounter this issue and how you resolved it and what configuration you
used.  I want term to term mapping results from the query and not a
combination of the two terms.

I would greatly appreciate any help.

Thanks,
Pla

-----------field type and filter Configuration

    <fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory"
language="English" protected="protwords.txt"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory"
language="English" protected="protwords.txt"/>
      </analyzer>
    </fieldType>

Reply via email to