Change default sorting from ASCII to alphabetical

Hello,
our customer wishes for his tables to be sorted case-insensitive. Is there a setting in the SME that achieves this?

Problem
When making a column sortable the only option available is the preferred sorting (ASC / DESC). Unfortunately lower and upper case words are treated differently and we did not find a setting to change the sorting behaviour.

Example
Values: a, B, A, z, b
actual sorting behavior: A, B, a, b, z
desired sorting behavior: A, a, B, b, z

Problem resolution attempts
We found the following topic while looking for a solution to our problem, but the suggested solution is limited to older versions of a12.

Hi @jonas-silver-ledge, updating Solr schema should still be an option.

Hey @jonas-silver-ledge,

if you speak about tables/repeats in the Form Engine, there is the setting Alphabetical Sorting in the Document Model. Ticking it for the respective fields should solve this issue:

@felix-blazing-river, thanks for your reply!
We need to sort values in an Overview Model. Unfortunately checking the alphabetical sorting option in the corresponding Domain Model didnt correct the Overview Model sorting.

@petr-high-peak:
I managed to copy and overwrite the default solr-config. Specify specific schema.xml for solr? - #4 by tbarros was helpful in that regard.
For our default sorting i created a new FieldType in the schema.xml and used it as the type of the dynamic “*_Sort”-Field. This seems to resolve our sorting-issue. Since I have never worked with solr before, I cant guarantee that this is the correct way to define the fieldType:

<fieldType name="AlphabeticalSorting" class="solr.TextField" sortMissingLast="true" omitNorms="true">
	<analyzer>
		<tokenizer class="solr.KeywordTokenizerFactory"/>
		<filter class="solr.LowerCaseFilterFactory" />
		<filter class="solr.TrimFilterFactory" />
	</analyzer>
</fieldType>

<dynamicField name="*_SORT" type="AlphabeticalSorting" indexed="true" stored="false" multiValued="false"/>

One issue I have with this solution is that if the default solr-config changes in the future, our project wont get those changes since we overwrite the solr-config. Do you think this might become an issue?

Hi @jonas-silver-ledge,

currently, Solr config files are in a grey zone regarding public API definition. But we try to announce all changes to these files in migration notes.

There is a change planned in 2024.06 regarding solr config, so you should transfer your sort configuration then. But I don’t expect too big a migration effort in the future. Ad we even plan replacement of the Solr in the future, so then it will be no issue either.