← All Learning Paths

Search Engineer

A search path covering full-text search, TF-IDF, bloom filters, tries and autocomplete, fuzzy matching, and sharding.

roleadvanced13 nodes12.5h total

Path overview

搜索引擎需要在索引、排序与召回之间做精细权衡。本路径从无 LIKE 扫描的全文检索出发,覆盖 TF-IDF 关键词提取、布隆过滤器去重、Trie 前缀自动补全、编辑距离与 Jaro-Winkler 模糊匹配、子串搜索,并以分片收尾。

This path balances indexing, ranking, and recall: full-text search without LIKE scans, TF-IDF keyword extraction, bloom-filter dedupe, trie-based autocomplete, edit-distance and Jaro-Winkler fuzzy matching, substring search, and sharding.

  1. Execute "Add Full-Text Search Without LIKE Scans" end to end, then repeat the last step with one parameter changed and compare "Replace slow ILIKE searches with a maintained tsvector column and ranked full-text queries.".

    Completion criteria: Deliver a transcript of "Add Full-Text Search Without LIKE Scans" with each step's command and observed state, ending at "Replace slow ILIKE searches with a maintained tsvector column and ranked full-text queries.".

    Next step: Extract TF-IDF Keywords from Text Documents

    ⏱ 0.5h

  2. Run the search snippet "Extract TF-IDF Keywords from Text Documents", capture stdout, and show which line demonstrates the documented behavior: "Rank the most distinctive keywords in a small document set with term frequency, inverse".

    Prerequisites: Add Full-Text Search Without LIKE Scans

    Completion criteria: Paste the command, the exit code, and the output line matching "Rank the most distinctive keywords in a small document set with term frequency, inverse"; then show a second run with a changed parameter.

    Next step: Bloom Filter With Double Hashing

    ⏱ 0.75h

  3. Adapt "Bloom Filter With Double Hashing" to a second input and compare the new output with the behavior described in "the BloomFilter entry point".

    Prerequisites: Extract TF-IDF Keywords from Text Documents

    Completion criteria: Change one constant in "Bloom Filter With Double Hashing", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Bloom Filter Membership Test

    ⏱ 0.75h

  4. Execute "Bloom Filter Membership Test", change one constant, and describe how the output diverges from "Test set membership with a compact Bloom filter using double hashing, a configurable error".

    Prerequisites: Bloom Filter With Double Hashing

    Completion criteria: Paste the command, the exit code, and the output line matching "Test set membership with a compact Bloom filter using double hashing, a configurable error"; then show a second run with a changed parameter.

    Next step: Trie Autocomplete With Weighted Words

    ⏱ 0.75h

  5. Run the search snippet "Trie Autocomplete With Weighted Words", capture stdout, and show which line demonstrates the documented behavior: "Store weighted words in a case-insensitive trie and return autocomplete suggestions ranked".

    Prerequisites: Bloom Filter Membership Test

    Completion criteria: Save two runs of "Trie Autocomplete With Weighted Words" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Trie for Prefix Search and Autocomplete

    ⏱ 0.75h

  6. Adapt "Trie for Prefix Search and Autocomplete" to a second input and compare the new output with the behavior described in "Insert weighted words into a trie, autocomplete by prefix, rank suggestions by weight, and".

    Prerequisites: Trie Autocomplete With Weighted Words

    Completion criteria: Attach the terminal transcript for "Trie for Prefix Search and Autocomplete": command, exit code, and the printed result you used to confirm "Insert weighted words into a trie, autocomplete by prefix, rank suggestions by weight, and".

    Next step: Levenshtein Edit Distance With Backtrace

    ⏱ 0.75h

  7. Execute "Levenshtein Edit Distance With Backtrace", change one constant, and describe how the output diverges from "Compute edit distance over Unicode code points and reconstruct insert, delete and substitute".

    Prerequisites: Trie for Prefix Search and Autocomplete

    Completion criteria: Change one constant in "Levenshtein Edit Distance With Backtrace", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Jaro-Winkler String Similarity

    ⏱ 0.75h

  8. Run the search snippet "Jaro-Winkler String Similarity", capture stdout, and show which line demonstrates the documented behavior: "the jaroSimilarity entry point".

    Prerequisites: Levenshtein Edit Distance With Backtrace

    Completion criteria: Paste the command, the exit code, and the output line matching "the jaroSimilarity entry point"; then show a second run with a changed parameter.

    Next step: KMP Substring Search With Prefix Table

    ⏱ 0.75h

  9. Adapt "KMP Substring Search With Prefix Table" to a second input and compare the new output with the behavior described in "the assertString entry point".

    Prerequisites: Jaro-Winkler String Similarity

    Completion criteria: Attach the terminal transcript for "KMP Substring Search With Prefix Table": command, exit code, and the printed result you used to confirm "Build the KMP prefix table and report every overlapping match index in linear time,".

    Next step: Natural Sort With Numeric Order

    ⏱ 0.75h

  10. Execute "Natural Sort With Numeric Order", change one constant, and describe how the output diverges from "Sort file names and labels naturally so item2 comes before item10, using Intl.Collator with".

    Prerequisites: KMP Substring Search With Prefix Table

    Completion criteria: Change one constant in "Natural Sort With Numeric Order", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Regular Expression Tester

    ⏱ 0.75h

  11. Feed a representative input into "Regular Expression Tester" and verify "Test regular expressions against sample text with live match highlighting, capture group" by hand.

    Prerequisites: Natural Sort With Numeric Order

    Completion criteria: Paste two input/output pairs from "Regular Expression Tester" and annotate the one where "Test regular expressions against sample text with live match highlighting, capture group" changes the result. in "Search Engineer" step 11.

    Next step: Rank Documents with Term Frequency and IDF

    ⏱ 0.25h

  12. Build "Rank Documents with Term Frequency and IDF" for search code and verify [{id:d1,score:2.7489},{id:d2,score:0.9163},{id:d3,score:0.9163}] against both samples.

    Completion criteria: Show the test run for "Rank Documents with Term Frequency and IDF" with two passing samples and one deliberately failing input, with the expected error.

    Next step: Capstone: Search Engineer

    ⏱ 0.5h

  13. Deliver the "Build a Full-Text Search API on PostgreSQL" blueprint with "Generated tsvector column" working and "GIN index" recorded as evidence.

    Prerequisites: Rank Documents with Term Frequency and IDF

    Completion criteria: Run the project's test command for "Build a Full-Text Search API on PostgreSQL", paste the passing output, and attach the acceptance note for "Generated tsvector column" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h