
Query requests against the documents collection can specify either an admin-key or query-key as the API key. An api-key is a unique, system-generated string that authenticates the request to your search service.

Optional if you're using Azure roles and a bearer token is provided on the request, otherwise a key is required. The following table describes the required and optional request headers. NET client library handles URL encoding for you. No URL encoding is necessary when calling Suggestions using POST, or when using the Azure Cognitive Search. If you inadvertently URL-encode the entire query string (everything after the ?), requests will break.Īlso, URL encoding is only necessary when calling the REST API directly using GET. URL encoding is only recommended for individual parameters. For Suggestions operations, this includes: Remember to URL-encode specific query parameters when calling the GET REST API directly. For queries, the api-version is always specified as a URI parameter for both GET and POST. The current stable version is api-version=. Specifies the documents collection of a named index. Set this to the unique, user-defined name of your search service. For more information about filter complexity limitations, see OData Expression Syntax for Azure Cognitive Search. Even though the POST request size limit is very large, filter expressions cannot be arbitrarily complex. With POST, the number of clauses in a filter is the limiting factor, not the size of the raw filter string since the request size limit for POST is approximately 16 MB. For these applications, HTTP POST is a better choice because it allows larger filters than GET. However, some applications produce very large queries, specifically when OData filter expressions are used. This length is usually enough for most applications. When called with GET, the length of the request URL cannot exceed 8 KB. In contrast with a Search Documents request, you might bind a Suggestions call to keyboard input, whereas a Search call might be bound to a click event. POST name]./indexes//docs/suggest?api-version=

The Suggest request can be constructed using the GET or POST methods. To improve the structure of results, consider using the $select filter to return additional fields that provide more differentiation and context.

If matching terms or phrases are identical across documents, the matching content is repeated. In contrast with Autocomplete, which returns a completed term or phrase used in a secondary query, this request returns information that resolves to actual documents.
#Suggester definition plus
The response is a content from a matching document plus the document key. For example, if you enable suggestions on a city field, typing "sea" produces documents containing "Seattle", "Sea Tac", and "Seaside" (all actual city names) for that field. A Suggestions request is a search-as-you-type query that looks for matching values in suggester-aware fields and returns documents that contain a match.
