It seems that SE is sorting text fields in Ascii order. For example, given these texts, and I want to sort in ascending order:
a
B
A
z
_
SE returns the texts follows ASCII order as below:
A
B
_
a
z
But in standard Alphabetical order, it should be:
_
A
a
B
z
There is a tool to check it Put any text in Alphabetical Order with this free tool
Is there any way to have the result as in the second example?
Thanks
HI @trung-async-stone,
schema.xml contains definition of sort for all text fields of all documents. Currently, the definition for the sort field is sort as ASCII strings because we just compare strings here:
<fieldType name="keywordAnalyzer" class="solr.TextField" omitNorms="false" sortMissingLast="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
</fieldType>
It is possible to change sorting definition for all text fields of all documents by changing the stack of analyzers:
<dynamicField name="*_SORT" type="YOUR_DESIRED_SORT_ANALYZER" indexed="true" stored="false" multiValued="false"/>
There is no option to change this behavior with configuration in lucene (dev configuration).
Please create a ticket if you need a different behavior for different models or if you would like more A12 tooling support.
This answerd is valid for DS versions 30.1 - 34.2.3