I think your best bet is to NOT use string, use
something like:

  <fieldType name="lowercase" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
      <analyzer>
        <!-- KeywordTokenizer does no actual tokenizing, so the entire
             input string is preserved as a single token
          -->
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <!-- The LowerCase TokenFilter does what you expect, which can be
             when you want your sorting to be case insensitive
          -->
        <filter class="solr.LowerCaseFilterFactory" />
        <!-- The TrimFilter removes any leading or trailing whitespace -->
        <filter class="solr.TrimFilterFactory" />
  </fieldType

The TrimFilterFactory is optional here. this will do what you need.
Of course you'll have to re-index.

Best
Erick

On Thu, Feb 23, 2012 at 6:29 PM, Yuhan Zhang <yzh...@onescreen.com> wrote:
> hi all,
>
> I am storing a list of tags in a field using type="string" with multiValued
> setting:
>
> <field name="pageKeywords" type="string" indexed="true" stored="true"
> multiValued="true"/>
>
> It works ok, when I query with  pageKeyword:"The ones". and when I search
> for "ones" no record will come up as desired.
>
> However, it appears that the query is case sensitive. so the query
> pageKeyword:"The ones" and pageKeyword:"The Ones"
> give different results, which is not desirable in my case.
>
> Is there some setting in the query to let it ignore the cases? or I have
> to correct the data by keeping everything lower case.
>
>
> Thank you.
>
> Yuhan Zhang

Reply via email to