← Questions

Design search result highlighting

0
FigmaSystem designLast asked Jan 2021

A search service already returns ranked document IDs and the query terms each one matched. Design the step that adds a short snippet to every result with each match marked. Snippets must come from the exact document version the result refers to, handle repeated and overlapping matches, never break Unicode characters, and never let document text turn into executable markup in the client. Cover how snippets are computed, where document text comes from, caching, latency, and the fallback when the right version is unavailable.

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing