Such a task is: implement a sort (preferably organic) in the sphinx attribute.
The problem is that in Sphinx Delta indexes, sorting by attribute sql_attr_str2ordinal is absolutely not suitable. Because that's what we said documentation: Note that the ordinals are by construction local to each index, and it's therefore impossible to merge ordinals while retaining the proper order. The processed strings are replaced by their sequential number in the index they occurred in, but different indexes have different sets of strings. For instance, if the 'main' index contains strings "aaa", "bbb", "ccc", and so on up to "zzz", they'll be assigned numbers 1, 2, 3, and so on up to 26, respectively. But then if 'delta' only contains "zzz" the assigned number will be 1. And after the merge, the order will be broken.
Is the following idea:
to calculate the numerical equivalent of the row, calculate the name in the first 8 characters
But with this algorithm:
In fact, we are dealing with a limited range of characters — digits, Latin and Russian alphabets in lower case (68 characters). This character set can be represented as number 68, we used the hexadecimal number system. Everything we do, we set the number of 68, we used the hexadecimal 10 hexadecimal. The symbols we translate into decimal codes, and then consider the formula a(n) * (68 ** 0) + a(n-1) * (68 ** 1) +... + a(1) * (68 ** n)
Question: is it right? Can anyone have sensible suggestions, all in the ideal would be natural sorting.