3
votes

I was trying to search Documents using the Azure Search Service REST API, with ORDER BY field populated with a certain field on my search index model:

The Request Body format is like this according to :
https://docs.microsoft.com/en-us/rest/api/searchservice/search-documents

{  
     "count": true | false (default),  
     "facets": [ "facet_expression_1", "facet_expression_2", ... ],  
     "filter": "odata_filter_expression",  
     "highlight": "highlight_field_1, highlight_field_2, ...",  
     "highlightPreTag": "pre_tag",  
     "highlightPostTag": "post_tag",  
     "minimumCoverage": # (% of index that must be covered to declare query successful; default 100),  
     "orderby": "orderby_expression",  
     "scoringParameters": [ "scoring_parameter_1", "scoring_parameter_2", ... ],  
     "scoringProfile": "scoring_profile_name",  
     "search": "simple_query_expression",  
     "searchFields": "field_name_1, field_name_2, ...",  
     "searchMode": "any" (default) | "all",  
     "select": "field_name_1, field_name_2, ...",  
     "skip": # (default 0),  
     "top": #  
   }

As the "orderby", I put it like this: "orderby":"Title asc" where "Title" is a field in my search index model.

The result returned is sorted based on Title asc, but it's case sensitive, that's all A-Z records come before a-z records. Is there a way that I can make this order by case-insensitive? Thanks!

1

1 Answers

3
votes

Currently, there's no built-in way to do case-insensitive sorting. One way to do this is to add a field to your index with case-normalized values and sort by that field.

Please vote for this UserVoice suggestion to promote this feature to achieve.