Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
Solr, mail # user - synonym configuration logic require


Copy link to this message
-
synonym configuration logic require
Jonty Rhods 2010-10-12, 16:40
Hi all,

I am pretty new in solr. I want to configure synonym for forwarding result
(for exact match).

my schema is :

<fieldType name="text_sync" class="solr.TextField"
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
  <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>

          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>

      </analyzer>
    </fieldType>
There is name field which is define as text_sync. When I am searching by
"newyork show" its working fine and giving exact result (there is exact
value "newyork show" in index).
Now I want if someone search by "newyork live show" I want to forward it to
"newyork show", so it will match exactly.
I put "newyork live show=>newyork show" in synonym but it is not working.
When changing tokenizer (query time) to standardtokenizerFilterFactory it
work but same time my normal result "newyork show" stop giving exact result.

My requirement is to highlight the background in html when exact match come.
so I want to use synonym..

please help me to get desire result or let me know if any other better way
to get my requirement...
+
Jonathan Rochkind 2010-10-12, 19:02