Skip to content

Commit ed11810

Browse files
committed
checkpoint
1 parent ccc61fa commit ed11810

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/search/search-add-autocomplete-suggestions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
2-
title: Add autocomplete to a search box
2+
title: Autocomplete or typeahead
33
titleSuffix: Azure Cognitive Search
4-
description: Enable search-as-you-type query actions in Azure Cognitive Search by creating suggesters and formulating requests that autocomplete a search box with finished terms or phrases. You can also return suggested matches.
4+
description: Enable search-as-you-type query actions in Azure Cognitive Search by creating suggesters and queries that autocomplete a search string with finished terms or phrases. You can also return suggested matches.
55

66
manager: nitinme
77
author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 09/12/2022
11+
ms.date: 10/03/2023
1212
ms.custom: devx-track-csharp
1313
---
1414

15-
# Add autocomplete and suggestions to client apps using Azure Cognitive Search
15+
# How to add autocomplete and search suggestions in client apps
1616

1717
Search-as-you-type is a common technique for improving query productivity. In Azure Cognitive Search, this experience is supported through *autocomplete*, which finishes a term or phrase based on partial input (completing "micro" with "microsoft"). A second user experience is *suggestions*, or a short list of matching documents (returning book titles with an ID so that you can link to a detail page about that book). Both autocomplete and suggestions are predicated on a match in the index. The service won't offer queries that return zero results.
1818

19-
To implement these experiences in Azure Cognitive Search, you will need:
19+
To implement these experiences in Azure Cognitive Search:
2020

21-
+ A *suggester* definition that's embedded in the index schema.
22-
+ A *query* specifying [Autocomplete](/rest/api/searchservice/autocomplete) or [Suggestions](/rest/api/searchservice/suggestions) API on the request.
23-
+ A *UI control* to handle search-as-you-type interactions in your client app. We recommend using an existing JavaScript library for this purpose.
21+
+ Add a `suggester` to an index schema
22+
+ Build a query that calls the [Autocomplete](/rest/api/searchservice/autocomplete) or [Suggestions](/rest/api/searchservice/suggestions) API on the request.
23+
+ Add a UI control to handle search-as-you-type interactions in your client app. We recommend using an existing JavaScript library for this purpose.
2424

2525
In Azure Cognitive Search, autocompleted queries and suggested results are retrieved from the search index, from selected fields that you have registered with a suggester. A suggester is part of the index, and it specifies which fields will provide content that either completes a query, suggests a result, or does both. When the index is created and loaded, a suggester data structure is created internally to store prefixes used for matching on partial queries. For suggestions, choosing suitable fields that are unique, or at least not repetitive, is essential to the experience. For more information, see [Create a suggester](index-add-suggesters.md).
2626

27-
The remainder of this article is focused on queries and client code. It uses JavaScript and C# to illustrate key points. REST API examples are used to concisely present each operation. For links to end-to-end code samples, see [Next steps](#next-steps).
27+
The remainder of this article is focused on queries and client code. It uses JavaScript and C# to illustrate key points. REST API examples are used to concisely present each operation. For end-to-end code samples, see [Next steps](#next-steps).
2828

2929
## Set up a request
3030

0 commit comments

Comments
 (0)