I have a field-name called "customer" contains the following values,
- Brooks Sports
- AM-Records
- 1elememt
- ALTAVISTA
- Adidas
- 3gdata
- Apple
- BMW
- 7eleven
bic corporation
customer field in solr schema.xml
<field docValues="true" indexed="true" multiValued="false" name="customer" stored="true" type="TextField"/>
I need to perform case-insensitive sort on above customer values. so i can get the data as follow,
- 1elememt
- 3gdata
- 7eleven
- Adidas
- ALTAVISTA
- AM-Records
- Apple
- bic corporation
- BMW
- Brooks Sports
for this i create a new copyField named "customer_sort" field in scheme.xml
<field docValues="true" indexed="true" multiValued="false" name="customer_sort" stored="false" type="LowerTextField"/>
fieldType in scheme.xml
<fieldType name="LowerTextField" class="solr.TextField" sortMissingLast="true" positionIncrementGap="1000">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
copyfield in scheme.xml
<copyField source="customer" dest="customer_sort"/>
currently the sort result is
- 1elememt
- 3gdata
- 7eleven
- ALTAVISTA
- AM-Records
- Adidas
- Apple
- BMW
- Brooks Sports
- bic corporation
sort happening based on ascii value. i.e.(A then a, B then b,...).
Same happen when i tried alphaOnlySort.
Can anybody please tell me what i'm missing?
Thanks
index
andquery
chains if they're identical. – MatsLindh