On 4/29/10 8:50 PM, Marco Martinez wrote:
Hi Ranveer,
If you don't specify a field type in the q parameter, the search will be
done searching in your default search field defined in the solrconfig.xml,
its your default field a text_sync field?
Regards,
Marco Martínez Bautista
http://www.paradigmatecnologico.com
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón
Tel.: 91 352 59 42
2010/4/29 Ranveer<ranveer.s...@gmail.com>
Hi,
I am trying to configure synonym filter.
my requirement is:
when user searching by phrase like "what is solr user?" then it should be
replace with "solr user".
something like : what is solr user? => solr user
My schema for particular field 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.TrimFilterFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" tokenizerFactory="KeywordTokenizerFactory"/>
</analyzer>
</fieldType>
it seems working fine while trying by analysis.jsp but not by url
http://localhost:8080/solr/core0/select?q="what is solr user?"
or
http://localhost:8080/solr/core0/select?q=what is solr user?
Please guide me for achieve desire result.
Hi Marco,
thanks.
yes my default search field is text_sync.
I am getting result now but not as I expect.
following is my synonym.txt
what is bone cancer=>bone cancer
what is bone cancer?=>bone cancer
what is of bone cancer=>bone cancer
what is symptom of bone cancer=>bone cancer
what is symptoms of bone cancer=>bone cancer
in above I am getting result of all synonym but not the last one "what
is symptoms of bone cancer=>bone cancer".
I think due to stemming I am not getting expected result. However when I
am checking result from the analysis.jsp,
its giving expected result. I am confused..
Also I want to know best approach to configure synonym for my requirement.
thanks
with regards