In order to preserve case for the data, but not for indexing, I have
created two fields. One is type Author that is defined as:

    <fieldType name="author" class="solr.StrField"
sortMissingLast="true" omitNorms="true">
                <analyzer>
                        <tokenizer class="solr.KeywordTokenizerFactory"/>
                        <filter class="solr.StandardTokenizerFactory"/>
                        <filter class="solr.LowerCaseFilterFactory"/>
                </analyzer>
    </fieldType>

and the other is just string:

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

this is used then for the author lists:
   <field name="authors" type="author" indexed="true" stored="true"
omitNorms="true" multiValued="true"/>
   <field name="all_authors" type="string" indexed="true"
stored="true" omitNorms="true" multiValued="true"/>

Is there any other way than to have two fields like this? One for
searching and one for displaying. People's names can be vary case
sensitive for display purpose (eg McDonald. DeBros) but I don't want
people to miss results because they search for "lee" instead of "Lee".

Also, can anyone see danger is using StandardTokenizerFactory for
people's names?
-- 
Regards,

Ian Connor

Reply via email to