lucene-solr-user mailing list archives

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

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">
   <tokenizer class="solr.KeywordTokenizerFactory" />
    <filter class="solr.LowerCaseFilterFactory"/>

*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="buildOnOptimize">true</str>
    <str name="buildOnCommit">true</str>
    <str name="field">label_autocomplete</str>

Kindly share your suggestions to implement this behavior.

KnackForge <>
Acquia Service Partner
No. 1, 12th Line, K.K. Road, Venkatapuram,
Ambattur, Chennai,
Tamil Nadu, India.
PIN - 600 053.

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