solrsolr6solr-query-syntax

Solr 6.6.0 Case Insensitive Query Not Working


Solr 6.6.0 Case Insensitive Query Not Working. I had tried all other option/answer available on internet.

I had tired with,

<tokenizer class="solr.LowerCaseTokenizerFactory"/> 

but its not working.

I had tired with,

<filter class="solr.LowerCaseFilterFactory"/>

but its not working.

I had tired many different way, but none working.

i.e I want same result searching with title_s:iPhone and title_s:iphone.

I am not sure what would cause problem.


Solution

  • I had tried in many different way, but none work. Than I had implement as below and it work fine.

    Let me know below method is correct or not, but works fine for me :)

    I had remove below code from schema,

    <fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
    

    And added (replace) below code,

    <fieldType name="string" class="solr.TextField">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>