Hi,

I am trying to do a facet search and sort the facet values too.

First I tried with 'solr.TextField' as field type. But this does not return
sorted facet values.

After referring to
FAQ(http://wiki.apache.org/solr/FAQ#Why_Isn.27t_Sorting_Working_on_my_Text_Fields.3F),
I changed it to 'solr.StrField', it did work. But sorting was not always
correct, e.g. 'ALPHA' was sorted above 'Abacus'.

Then I followed the sample example schema.xml, created a copyField of type
''

                <fieldType name="alphaOnlySort" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
                        <analyzer>
                                <tokenizer 
class="solr.KeywordTokenizerFactory"/>
                                <filter class="solr.LowerCaseFilterFactory"/>
                                <filter class="solr.TrimFilterFactory"/>
                                <filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z])" replacement=""  
                                      replace="all"/> -->
                        </analyzer>
                </fieldType>

But this gave another problem if the data contains any non-alpha
characters(was replaced). Hence I removed the PatternReplaceFilterFactory
from the above definition and it worked well.

But the sorted facet values dont have their case preserved anymore. 

How can I get around this?

Thank You.

Regards,
Shan 
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Case-Insensitive-sorting-while-preserving-case-during-faceted-search-tp2099248p2099248.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to