![]() The syntax for some parameters is slightly different between GET and POST. ",Ī query accepts several parameters on the URL when called with GET, and as JSON properties in the request body when called with POST. "searchFields": "field_name_1, field_name_2. "minimumCoverage": # (% of index that must be covered to declare query successful default 80), "autocompleteMode": "oneTerm" (default) | "twoTerms" | "oneTermWithContext", See Connect to Cognitive Search using key authentication for details. The query-key is used for read-only operations on an index documents collection. Query requests against the docs 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, which handles encoding for you. No URL encoding is necessary when 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 Autocomplete, URL-encoding might be necessary for the following query parameters: 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 can't 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 can't exceed 8 KB. POST name]./indexes//docs/autocomplete?api-version= ![]() The Autocomplete request can be constructed using the GET or POST methods. Internally, the search engine looks for matching terms in fields that have a Suggester configured. For example, if the query input is "medic", the Autocomplete API returns "medicare", "medicaid", "medicine" if those terms are in the index. The Autocomplete API finishes a partially typed query input using existing terms in the search index for use in a secondary query. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |