Search code examples
azureazure-cognitive-searchazure-cognitive-services

Is there a way to ignore null values when ordering by ascending with Azure Cognitive Search Service?


In the documentation for the Azure Cognitive Search Service query parameters, in the row for $orderby it's mentioned that null values will appear first when ascending order is selected and last when descending.

Is there any way that I can ignore these null values and just start when the value is not null or do I just need to process them after the request to filter the ones with null values?

Thanks :)


Solution

  • You can include a filter clause in the search query: $filter=A ne null