Azure AI Search Solution: Apply Filtering and Sorting
Apply Filtering and Sorting Users frequently like to filter and order query results according to field values in search solutions. Both of these features are supported by Azure AI Search via the search query API. Filtering Results You can apply filters to queries in two ways: By including filter criteria in a simple search expression. By providing an OData filter expression as a $filter parameter with a full syntax search expression. You can apply a filter to any filterable field in the index. Filtering With Facets When presenting users with filtering criteria based on field values in a result set, facets are a helpful tool. They function best when a field contains a limited number of discrete values that can be shown in the user interface as options or links. In order to use facets, you must first define the facetable fields for which you wish to extract the potential values. Sorting Results The query process's relevancy score is used by default to rank the results, with the hig...