Solr alphabetical sorting trouble. Sorting uppercase then lowercase for string type field

Posted by Alauddin Ansari on Stack Overflow See other posts from Stack Overflow or by Alauddin Ansari
Published on 2013-10-25T09:51:27Z Indexed on 2013/10/25 9:54 UTC
Read the original article Hit count: 123

Filed under:
|

I've crated a title field with list below:

  1. Asking is good
  2. But answering is best
  3. join the group like this
  4. You are the best
  5. hey dudes. whass up

When I'm sorting this ASC (&sort=title ASC)

  1. Asking is good
  2. But answering is best
  3. You are the best
  4. hey dudes. whass up
  5. join the group like this

and (&sort=title DESC)

  1. join the group like this
  2. hey dudes. whass up
  3. You are the best
  4. But answering is best
  5. Asking is good

But I'm expecting result like: (&sort=title ASC)

  1. Asking is good
  2. But answering is best
  3. hey dudes. whass up
  4. join the group like this
  5. You are the best

schema.xml

<field name="title" type="text_general" indexed="true" stored="true"/>
<field name="title_sort" type="string" indexed="true" stored="false"/>
<copyField source="title" dest="title_sort" />

I'm using title_sort field to sort (also tried title field)

Please tell me where I'm going wrong

© Stack Overflow or respective owner

Related posts about sorting

Related posts about solr