You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/tutorial-javascript-create-load-index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ The ESM script uses the Azure SDK for Cognitive Search:
46
46
47
47
## Run the bulk import script for Search
48
48
49
-
1. Continue using the integrated terminal in Visual Studio for the project directory's subdirectory, `search-website-functions-v4/bulk-insert`, to run the following bash command to run the `bulk_insert_books.js` script:
49
+
1. Continue using the integrated terminal in Visual Studio for the project directory's subdirectory, `search-website-functions-v4/bulk-insert`, to run the `bulk_insert_books.js` script:
When the user changes the page, that value is sent to the parent `Search.js` page from the `handleChangePage` function. In the parent page, a change to the current page is detected which requires a new request is sent to the search API for the same query text and the new page. The API response results change the facets, results, and pager components.
60
+
When the user changes the page, that value is sent to the parent `Search.js` page from the `handleChangePage` function. The function sends a new request to the search API for the same query and the new page. The API response updates the facets, results, and pager components.
61
61
62
62
## Azure Function: Suggestions from the catalog
63
63
@@ -73,9 +73,9 @@ The Suggest function API is called in the React app at `\src\components\SearchBa
This React component uses the `@mui/material/Autocomplete` component to provide a search textbox, which also supports displaying suggestions (using the `renderInput` function) as the user types in characters. When each character is entered, the search is sent to API. The API results are displayed as a short list of suggestions.
76
+
This React component uses the `@mui/material/Autocomplete` component to provide a search textbox, which also supports displaying suggestions (using the `renderInput` function). Autocomplete starts after the first several characters are entered. As each new character is entered, it's sent as a query to the search engine. The results are displayed as a short list of suggestions.
77
77
78
-
This autosuggest functionality is a common feature but this specific implementation has an additional use case. The customer can enter text and select from the suggestions _or_ submit their entered text. The input from the suggestion list as well as the input from the textbox must be tracked for changes, which impact how the form is rendered and what is sent to the **search** API when the form is submitted.
78
+
This autocomplete functionality is a common feature but this specific implementation has an additional use case. The customer can enter text and select from the suggestions _or_ submit their entered text. The input from the suggestion list as well as the input from the textbox must be tracked for changes, which impact how the form is rendered and what is sent to the **search** API when the form is submitted.
79
79
80
80
If your use case for search allows your user to select only from the suggestions, that will reduce the scope of complexity of the control but limit the user experience.
0 commit comments