Hi,
I'm not familiar with the German analysis chain options, but perhaps you
can use a Copyfield at index time to create a new normalised text field
with a different analysis chain that strips umlauts and other modifiers,
so all types of 'a' become just plain 'a'. You could then use this field
for sorting - you don't have to display it or use it for anything else.
It looks like you've got 'cp' in some of your field names already so I
guess you're familiar with CopyField.
Best
Charlie
On 01/02/2022 11:57, Sebastian Riemer 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
--
Charlie Hull - Managing Consultant at OpenSource Connections Limited
Founding member of The Search Network <http://www.thesearchnetwork.com>
and co-author of Searching the Enterprise
<https://opensourceconnections.com/wp-content/uploads/2020/08/ES_book_final_journal_version.pdf>
tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828
OpenSource Connections Europe GmbH | Pappelallee 78/79 | 10437 Berlin
Amtsgericht Charlottenburg | HRB 230712 B
Geschäftsführer: John M. Woodell | David E. Pugh
Finanzamt: Berlin Finanzamt für Körperschaften II
--
This email has been checked for viruses by AVG.
https://www.avg.com