issue with case-insensitive sorting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

issue with case-insensitive sorting

Satish Chennupati



Right now when I perform a sort I  am getting result as following:



"[\"18 hotfix3\"]"


"[\"Godzilla, King of the Monsters!\"]"

"[\"Harry Potter and the Sorcerers Stone\"]"

"[\"How to Train Your Dragon\"]"

"[\"Jurassic Park\"]"

"[\"My Big Fat Greek Wedding\"]"

"[\"National Treasure\"]"


"[\"Patch Adams\"]"





"[\"The Amazing Spider-Man 2\"]"

"[\"The Godfather\"]"

"[\"The Lord of the Rings: The Fellowship of the Ring\"]"

"[\"The Matrix\"]"

"[\"V for Vendetta\"]"








The field type has been defined as follows :


       <fieldType class="org.apache.solr.schema.TextField" name="TextField" sortMissingLast="true">


                <tokenizer class="solr.KeywordTokenizerFactory"/>

                <!-- lower case everything -->

                <filter class="solr.LowerCaseFilterFactory"/>

                <!-- remove lead/trail whitespace -->

                <filter class="solr.TrimFilterFactory"/>

                <!-- pad and trim numbers to an even 6 digits with leading 0's -->

                <filter class="solr.PatternReplaceFilterFactory"

                        pattern="(\d+)" replacement="00000$1" replace="all"/>

                <filter class="solr.PatternReplaceFilterFactory"

                        pattern="0*([0-9]{6,})" replacement="$1" replace="all" />






And for sorting purpose we have a dynamic field in place that used the above field type

        <!-- fields for sorting -->

        <dynamicField indexed="true" multiValued="false" name="sort_str*" stored="false" type="SortTextField"/>


Issue: even though we have lowercase filter factory in place the sort doesn’t happen case-insensitive.


Satish Chennupati

Senior Server Engineer

Cell:         (416) 918-9959

Email:      [hidden email]


This email and any attachments are for the sole use of the intended recipients and may be privileged or confidential. Any distribution, printing or other use by anyone else is prohibited. If you are not an intended recipient, please contact the sender immediately, and permanently delete this email and attachments.

Le présent courriel et les documents qui y sont joints sont exclusivement réservés à l'utilisation des destinataires concernés et peuvent être de nature privilégiée ou confidentielle. Toute distribution, impression ou autre utilisation est interdite aux autres personnes. Si vous ne faites pas partie des destinataires concernés, veuillez en informer immédiatement l'expéditeur, ainsi que supprimer ce courriel et les documents joints de manière permanente.