Reputation: 1821
So I want to sort my Solr response by the following fields:
Problem is that status_color
must be sorted by the following values (e.i. not alphabetically):
This field may only contain one of these values.
I'm hoping theres a way of doing this in the Solr query instead of massaging the result in code. With a result of hundreds of thounsands of documents it's not really an option.
Any help is appreciated.
Upvotes: 6
Views: 5642
Reputation: 9789
I believe Solr has Enum types, though I have never seen them used in a while. But they would be a perfect match, so worth a try.
Upvotes: 3
Reputation: 1019
I think the answer for this question will be valid for you too:
Is it possible in solr to specify an ordering of documents
Upvotes: 3