Skip to content

Commit e0cf83d

Browse files
Merge pull request #2406 from HeidiSteen/heidist-freshness
static web app tutorial update, consolidate search/suggestions
2 parents f85c0fa + 7101212 commit e0cf83d

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

articles/search/tutorial-csharp-search-query-integration.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: diberry
77
ms.author: diberry
88
ms.service: azure-ai-search
99
ms.topic: tutorial
10-
ms.date: 01/17/2025
10+
ms.date: 01/21/2025
1111
ms.custom:
1212
- devx-track-csharp
1313
- devx-track-dotnet
@@ -34,9 +34,11 @@ The function app authenticates through the SDK to the cloud-based Azure AI Searc
3434

3535
## Azure Function: Search the catalog
3636

37-
The [Search API](https://github.com/Azure-Samples/azure-search-static-web-app/blob/main/api/Search.cs) takes a search term and searches across the documents in the search index, returning a list of matches.
37+
The [Search API](https://github.com/Azure-Samples/azure-search-static-web-app/blob/main/api/Search.cs) takes a search term and searches across the documents in the search index, returning a list of matches. Through the Suggest API, partial strings are sent to the search engine as the user types, suggesting search terms such as book titles and authors across the documents in the search index, and returning a small list of matches.
3838

39-
The Azure function pulls in the search configuration information, and fulfills the query.
39+
The Azure function pulls in the search configuration information, and fulfills the query.
40+
41+
The search suggester, `sg`, is defined in the [schema file](https://github.com/Azure-Samples/azure-search-static-web-app/blob/main/bulk-insert/BookSearchIndex.cs) used during bulk upload.
4042

4143
:::code language="csharp" source="~/azure-search-static-web-app/api/Search.cs" :::
4244

@@ -46,17 +48,9 @@ Call the Azure Function in the React client with the following code.
4648

4749
:::code language="csharp" source="~/azure-search-static-web-app/client/src/pages/Search/Search.js" :::
4850

49-
## Azure Function: Suggestions from the catalog
50-
51-
The [Suggest API](https://github.com/Azure-Samples/azure-search-static-web-app/blob/main/api/Suggest.cs) takes a search term while a user is typing and suggests search terms such as book titles and authors across the documents in the search index, returning a small list of matches.
52-
53-
The search suggester, `sg`, is defined in the [schema file](https://github.com/Azure-Samples/azure-search-static-web-app/blob/main/bulk-insert/BookSearchIndex.cs) used during bulk upload.
54-
55-
:::code language="csharp" source="~/azure-search-static-web-app/api/Suggest.cs" :::
56-
5751
## Client: Suggestions from the catalog
5852

59-
The Suggest function API is called in the React app at `\client\src\components\SearchBar\SearchBar.js` as part of component initialization:
53+
The Suggest function API is called in the React app at `\client\src\components\SearchBar\SearchBar.js` as part of the [Material UI's Autocomplete component](https://mui.com/material-ui/react-autocomplete/). This component uses the input text to search for authors and books that match the input text then displays those possible matches at selectable items in the drop-down list.
6054

6155
:::code language="csharp" source="~/azure-search-static-web-app/client/src/components/SearchBar/SearchBar.js" :::
6256

0 commit comments

Comments
 (0)