| UI or UX | UI + UX - Highlighted matching terms and snippets inside returned search results | UI + UX - Search input and result list | UI + UX - Suggested-query surface | UI + UX - Search recovery state |
| UI guidance | Render highlighted query matches inside result titles, snippets, or field previews with semantic text markup such as mark and a visible style that does not rely on color alone. | Render a labeled search field, result count, matching rows, and clear action. | Render a search field with query suggestions, active option, selected suggestion, and no-suggestion state. | Render zero-result copy, active criteria, remove-filter actions, and alternative suggestions. |
| UX guidance | Use search result highlighting to explain relevance after a query has returned results, especially when users scan dense documents, records, tickets, messages, or logs. | Help users find known content without browsing every category. | Help users formulate better search queries without forcing a choice. | Help users recover when their own search or filters excluded all results. |
| Good UI | A result card for Benefits appeal policy highlights Benefits in the title and appeal in the snippet, with a small label saying 2 highlighted fields. | A clearly labeled search field with result count and results placed directly below. | Suggestions appear directly below the search field with active row, readable labels, and optional matched text. | Zero-result state shows query/filters, result count, and clear or broaden actions. |
| Bad UI | Every card background turns yellow when a query is submitted, but the matching words are not identified. | Search input hidden behind only an icon with no label. | Suggestions overlay unrelated content without a dismiss path. | No results text alone with no criteria shown. |
| Good UX | A user searches benefits appeal and can immediately see which result matched benefits in the title and appeal in the excerpt. | Users can type, revise, clear, and keep context while inspecting results. | Users can keep typing, choose a suggestion, dismiss suggestions, or submit their own query. | Users can remove one filter, clear all, edit query, or try suggested alternatives. |
| Bad UX | A highlighted synonym looks identical to an exact query match and users assume the document contains words it does not contain. | Search silently changes unrelated filters. | Auto-submitting the top suggestion. | Telling users nothing exists when filters caused the state. |
| Best fit | Results contain enough text that users need to scan for where the query matched. | Users know a word, name, or identifier. | The system can predict likely queries. | Search, browse, or filter controls can produce an empty result set. |
| Avoid when | The result title is the entire match and extra emphasis would add noise. | The task is choosing a command with side effects. | Suggestions are low quality or biased toward irrelevant content. | There is genuinely no possible next action and the system should instead explain availability. |
| Required state | No query state with no highlighted terms. | Empty query state. | No input state. | Zero-result state that preserves the user's criteria. |
| Accessibility burden | Use semantic text markup such as mark for highlighted passages when the highlight indicates relevance in the current search context. | The input has a stable accessible name. | Expose the suggestions list and active option. | Announce result-count changes where search results update dynamically. |
| Common misuse | Highlighting whole cards, rows, or table columns instead of the matching terms. | Using placeholder text as the only label. | Auto-submitting the top suggestion without confirmation. | Showing a blank list with no explanation. |