lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selvam <s.selvams...@gmail.com>
Subject Suggestion that preserve original phrase case
Date Fri, 11 Jan 2013 06:30:19 GMT
Hi*,

*
I have been trying to figure out a way for case insensitive suggestion but
which should return original phrase as result.* *I am using* *solr 3.5*

*
*For eg:

*
If I index 'Hello world' and search  for 'hello' it needs to return *'Hello
world'* not *'hello world'. *My configurations are as follows,*
*
*
New field type:*
<fieldType class="solr.TextField" name="text_auto">
  <analyzer>
   <tokenizer class="solr.KeywordTokenizerFactory" />
    <filter class="solr.LowerCaseFilterFactory"/>
</analyzer>

*Field values*:
   <field name="label" type="text" indexed="true" stored="true"
termVectors="true" omitNorms="true"/>
   <field name="label_autocomplete" type="text_auto" indexed="true"
stored="true" multiValued="false"/>
   <copyField source="label" dest="label_autocomplete" />

*Spellcheck Component*:
  <searchComponent name="suggest" class="solr.SpellCheckComponent">
    <str name="queryAnalyzerFieldType">text_auto</str>
    <lst name="spellchecker">
     <str name="name">suggest</str>
     <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
     <str
name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
    <str name="buildOnOptimize">true</str>
    <str name="buildOnCommit">true</str>
    <str name="field">label_autocomplete</str>
  </lst>
</searchComponent>


Kindly share your suggestions to implement this behavior.

-- 
Regards,
Selvam
KnackForge <http://knackforge.com>
Acquia Service Partner
No. 1, 12th Line, K.K. Road, Venkatapuram,
Ambattur, Chennai,
Tamil Nadu, India.
PIN - 600 053.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message