This post was most recently updated on October 19th, 2022
In contrast with full text search, a filter value or expression only returns a strict match. Faceted navigation uses a filter to pass back the facet category selected by the user. The “select” parameter is used to specify which fields to include in a result set, effectively trimming the response before sending it to the calling application. This parameter does not refine the query or reduce the document collection, but if a smaller response is your goal, this parameter is an option to consider.
- Method: POST
- URL: https://[name of the search service].windows.net/indexes/[name of the index]/docs/search?api-version=[api version]
- Authorization:
Type – API Key
Vale- [Value of the Primary Key]
Add to- Header - Headers:
Content-Type- “application/json”
API-Key – [value of the api key] - Body:
{
“facets”: [“A field to facet by. The string may contain parameters to customize the faceting, expressed as comma-separated name-value pairs.”],
“count”:[Specifies whether to fetch the total count of results],
“filter”:”[Only filterable fields can be used in a filter]”,
“search”:”[The text to search for.]”,
“queryType”:”full”,
“searchMode”: “[Specifies whether any or all of the search terms must be matched in order to count the document as a match]”,
“select”: “[all fields marked as retrievable in the schema are included in the projection]”}
- Response: 200 OK