๐๐๐ถ๐น๐ฑ๐ถ๐ป๐ด ๐๐ฟ๐ผ๐๐-๐๐ฎ๐ป๐ด๐๐ฎ๐ด๐ฒ ๐ฉ๐ถ๐ฑ๐ฒ๐ผ ๐ฆ๐ฒ๐ฎ๐ฟ๐ฐ๐ต
You search for kitchen fail videos. You see zero results. The video exists in Japanese.
Keyword search fails here. It looks for exact letters. It does not understand meaning.
I fixed this with a hybrid search system.
The setup:
- SQLite FTS5 for fast keyword matches.
- Postgres and pgvector for semantic search.
- OpenAI embeddings to connect different languages.
How it works:
- OpenAI turns text into numbers.
- Phrases like kitchen fail and ๆ็ๅคฑๆ land near each other.
- You find videos across different languages.
I used Reciprocal Rank Fusion to combine results. This blends exact matches from SQLite with meaning matches from Postgres.
The results:
- Zero-result queries dropped by two thirds.
- Search for Thai and Vietnamese videos improved.
- Exact channel names still rank first.
Tips for you:
- Avoid vector search alone. You lose exact match precision.
- Cache your query embeddings. This saves money and time.
- Store your source text. It makes re-indexing easier.
Combine keywords for precision and embeddings for meaning.