Azure Cognitive Search API Services

Search-as-You-Type Feature

Question

In your cognitive search solution, you plan to use search-as-you-type feature using the API services offered in Azure.

It would enhance user experience and productivity by finishing a phrase or matching the documents.

Review the API services in the answer choice below and select the one that returns the document id in order to fetch the document for the search-as-you-type feature.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

Option A is incorrect because Search API is used for cognitive search.

However for search-as-you-type, you need to use the Autocomplete or Suggestions API.

Option B is incorrect because the Autocomplete API, while supports search-as-you-type feature, does not provide the document id to fetch the document.

Option C is correct because Suggestions API returns terms and the document id.

This way you can fetch the search documents.

Option D is incorrect because the Gremlin API is used to index cognitive search data in Cosmos DB.Reference:

To learn more about Cognitive search autocomplete and suggestions, use the link given below:

The correct answer for the question is option B: Autocomplete API.

The Autocomplete API offered in Azure Cognitive Search is designed to provide a real-time search-as-you-type experience. This API suggests query completions based on the partial text entered by the user in the search box. The autocomplete results may include document IDs, which can then be used to retrieve the complete document from the search index.

The Search API is a more general-purpose API for searching documents in the Azure Cognitive Search index. It returns search results that match the search criteria provided in the search query, but it does not provide an autocomplete feature.

The Suggestions API is designed to provide query suggestions based on partial queries entered by the user. It returns a list of query suggestions that are related to the partial query entered by the user.

The Gremlin API is not related to Azure Cognitive Search. It is a graph database API that can be used to query data in Azure Cosmos DB.

Therefore, the Autocomplete API is the most appropriate choice for providing the search-as-you-type feature in the cognitive search solution and returning the document IDs for fetching the documents from the search index.