You can sort by function, see:
https://lucene.apache.org/solr/guide/6_6/function-queries.html. Not quite sure
what the function would look like though.
What I would do rather than a custom sort or sort by function is normalize
these into a different field at index time and just sort on that.
Hi,
Is it possible to add a custom comparator to a field for sorting. e.g.
let's say I have field 'name' and following documents
{
id : "doc1",
name : "1"
}
{
id : "doc2",
name : "S1"
}
{
id : "doc2",
name : "S2"
}
if I sort using field 'name', the order would be : ["doc1",