Types of search
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 8 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    How much does one LIKE '%kurta%' read, versus an inverted index?

      Judges mark 400 products relevant; the engine returns 500. Precision and recall?

        Hybrid search: B ranks 2nd and 1st, A 1st and 3rd. Which wins?

          Build-up · 7 steps

          Pick the machinery, one question at a time

          A real search box blends several kinds. Ask these questions in order and each answer names its machinery, then decide whether precision or recall matters more.

          Step 1 of 7

          Does the user know the key?

          Product P-48213 has one right answer, or none. A B-tree over Bazaar’s 50 million products is about four levels deep, so a lookup is four page reads, mostly from memory.

          4 interview moments

          You’re the candidate

          The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

          1. Deep dive 2 of 4

            Interviewer

            “Bazaar shoppers type “kurtha”, “panir” and “chapal” and see empty pages. How do you forgive typos?”

            Your move. Pick an approach:

          2. Deep dive 3 of 4

            Interviewer

            “In an incident, engineers paste fragments like ullPointerExcep and user_id=48213 into log search. Which machinery do you use?”

            Your move. Pick an approach:

          3. Deep dive 4 of 4

            Interviewer

            “Shoppers type “light office wear for May” and BM25 finds little. How do you add semantic search?”

            Your move. Pick an approach: