Page MenuHomePhabricator

docs: Improve search results
Open, Needs TriagePublic

Assigned To
None
Authored By
AnneT
Dec 19 2024, 8:51 PM
Referenced Files
F58194150: image.png
Jan 14 2025, 11:46 AM
F58194164: image.png
Jan 14 2025, 11:46 AM
F58194106: image.png
Jan 14 2025, 11:46 AM

Description

In T317792, we enabled basic search using an in-browser search engine, minisearch. This task covers improving the quality of search results.

Some ideas:

  • Add keywords to front matter
  • Play around with minisearch configuration
  • Consider changes to site/page architecture (e.g. we have a "Using components" heading on 2 pages, one of which links to the other - how will people know which to choose?)

Acceptance criteria

  • Review search results and make a list of issues
  • Make a plan to improve results
  • Execute that plan

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Sharing here some possible interaction improvements I've detected after exploring Search design improvements in T382574:

  • When opening the Search modal, it could show a list with the recent changes
    image.png (2,880×1,400 px, 243 KB)
  • If possible, we could show only one result per component page (e.g. “Button”) to prevent repeating sections with matching text from that page (e.g. “Button > Examples > Button sizes”).
  • If possible, we could include the results in the list only when they exactly match the typed text. For instance, typing "button group" should not show unrelated results like "Group of links" or "Radio group"
    image.png (1,024×940 px, 107 KB)

To organize the search results, I propose the following order:

  1. Exact page match: Display first the results where the typed text matches the title of a page exactly.
  2. Page's section match: Next, include results where the text matches a section title within a page.
  3. Paragraph in a section match: Finally, show results where the text matches words within a paragraph of a page section.
    image.png (1,024×1,164 px, 153 KB)

Additionally, I recommend organizing the results based on the main navigation structure, prioritizing pages in this order of importance:

  1. Components
  2. Design Tokens
  3. Icons
  4. Composables
  5. Style Guide
  6. Contributing
  7. Using Codex

Note: Within each category, results will be sorted alphabetically.