On 8/29/2021 12:09 PM, post.ta...@gmail.com wrote:
We need to sort the results based on alphabetic followed by numeric.
Something like below

<snip>

Expected results order:
Abctext
Bbctext
Cbctext
1test
2test
3test

This is contrary to all the "natural" sort ordering available in modern programming languages. In the ASCII table, numbers come before letters. Though one may exist, I have never heard about anything to do this in Java.

You would have to write (or find) custom sorting code to achieve this. And then somehow get it integrated into Solr ... and I have no idea how to integrate custom sorting algorithms.

Alternatively, you could return more results than the user actually asks for, sorted some other way like relevancy score, and then do the sort yourself in the client code (like a webapp).

Thanks,
Shawn

Reply via email to