PostgreSQL Hybrid Search Course – Keyword (BM25) + Vector Retrieval

Learn how to build a complete Wikipedia search engine entirely within PostgreSQL using BM25 keyword matching, vector embeddings, and reciprocal rank fusion. This step-by-step course covers setting up `pg_textsearch` and `pgvector-scale`, analyzing query plans, tuning hybrid weights, and serving results through a FastAPI backend. By keeping your data, keyword indexes, and vectors inside a single database, you eliminate complex synchronization pipelines and unlock fast, transactional search.

Code: https://github.com/beaucarnes/wikisearch

Try Tiger Data Cloud: https://tsdb.co/fcc-postgres-search

Chapters
- 00:00 Introduction & Project Overview
- 04:06 Matching vs. Ranking & PostgreSQL Text Search
- 07:20 Understanding BM25 (IDF, Term Frequency, & Document Length)
- 11:39 Setting Up Tiger Data Cloud & PostgreSQL
- 14:06 Environment Setup & Enabling Database Extensions
- 15:43 Loading Wikipedia Dataset & Schema Setup
- 20:30 Native PostgreSQL Full-Text Search Baseline
- 24:38 Analyzing Query Plans with EXPLAIN ANALYZE
- 27:40 Implementing BM25 Keyword Search with pg_textsearch
- 32:32 Building the Keyword Search Query & Highlighting (TS_HEADLINE)
- 36:18 Boolean Conditions & Phrase Search
- 37:32 Semantic Search Fundamentals & Generating Embeddings
- 41:33 Vector Indexing with pgvector-scale
- 43:28 Reciprocal Rank Fusion (RRF) for Hybrid Search
- 46:58 Query Plan Analysis for Hybrid Search
- 49:12 Comparing Keyword, Semantic, and Hybrid Results
- 52:13 Connecting the FastAPI Backend & Connection Pooling
- 54:06 Testing the Web Interface & Weight Tuning
- 55:23 Adding New Records via Transactional Writes
- 57:24 Scale Benchmarks & Next Steps for Optimization

🎉 Thanks to our Champion and Sponsor supporters:
👾 @omerhattapoglu1158
👾 @goddardtan
👾 @akihayashi6629
👾 @kikilogsin
👾 @anthonycampbell2148
👾 @tobymiller7790
👾 @rajibdassharma497
👾 @CloudVirtualizationEnthusiast
👾 @adilsoncarlosvianacarlos
👾 @martinmacchia1564
👾 @ulisesmoralez4160
👾 @_Oscar_
👾 @jedi-or-sith2728
👾 @justinhual1290

--

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://freecodecamp.org/news Receive SMS online on sms24.me

TubeReader video aggregator is a website that collects and organizes online videos from the YouTube source. Video aggregation is done for different purposes, and TubeReader take different approaches to achieve their purpose.

Our try to collect videos of high quality or interest for visitors to view; the collection may be made by editors or may be based on community votes.

Another method is to base the collection on those videos most viewed, either at the aggregator site or at various popular video hosting sites.

TubeReader site exists to allow users to collect their own sets of videos, for personal use as well as for browsing and viewing by others; TubeReader can develop online communities around video sharing.

Our site allow users to create a personalized video playlist, for personal use as well as for browsing and viewing by others.

@YouTubeReaderBot allows you to subscribe to Youtube channels.

By using @YouTubeReaderBot Bot you agree with YouTube Terms of Service.

Use the @YouTubeReaderBot telegram bot to be the first to be notified when new videos are released on your favorite channels.

Look for new videos or channels and share them with your friends.

You can start using our bot from this video, subscribe now to PostgreSQL Hybrid Search Course – Keyword (BM25) + Vector Retrieval

What is YouTube?

YouTube is a free video sharing website that makes it easy to watch online videos. You can even create and upload your own videos to share with others. Originally created in 2005, YouTube is now one of the most popular sites on the Web, with visitors watching around 6 billion hours of video every month.