I would assume it's just sorting by UTF8 decimal order like most programming 
languages do. See:
https://www.w3schools.com/charsets/ref_utf_basic_latin.asp
https://www.w3schools.com/charsets/ref_utf_latin1_supplement.asp

I believe you'll have to either store a new field with a custom sort (if you 
want to handle it inside the Lucene index) in it or you'll need to write a 
custom sort function.

On 2/1/22, 5:58 AM, "Sebastian Riemer" <s.rie...@littera.eu> wrote:

    Hello,

    I have documents with family names in german language context.
    The field type is defined like this: <fieldType name="string" 
class="solr.StrField" sortMissingLast="true" />

    When sorting by this family name, I get results ordered like that:

    Ascending order:
    1. Bart
    2. Otz
    3. Ozzbourne
    4. Zacharias
    5. bariton
    6. biene
    7. burtsch
    8. ozza
    9. Ádele
    10. Òle
    11. Ônna
    12. Ötz
    13. ägnie
    14. órthega

    So, the ordering is:

      1.  A-Z (Uppercase)
      2.  a-z (Lowercase)
      3.  Umlauts and special accents

    That ordering seems suprising to me, I'd prefer it like this:

      1.  aäàâ-z (Lowercase)
      2.  AÄÀÂ-Z (Uppercase)

    Or in other words, lowercase before uppercase, and Umlauts and Special 
accents after its "natural character".

    Here is the full query fort he above example:

    start=0
    &rows=50
    &fq=tenant_id:1
    &fq=u_markedAsDeleted_b:false
    
&fq={!tag%3Du_cg_customergroup_0}(((u_customerGroupMemberships_customergroup_cp_ts_ns:(24))))
    &fq=u_id_cp_s:[*+TO+*]&q=*:*
    &facet=true
    &facet.missing=true
    &facet.sort=count
    &facet.mincount=1
    &sort=u_familyName_cp_s+asc,u_userName_cp_s+desc
    &qf=u_userName_cp_s^20+u_displayName_cp_s^20++text^2+text_en+text_de+text_it
    &pf=u_userName_cp_s^100+u_displayName_cp_s^20++text^10
    &mm=100%25


    Could you please give me some direction which parts of the documentation I 
can study to learn about sorting and how to achieve a custom sorting?

    Thank you and best regards,

    Sebastian


Reply via email to