Qdrant Hybrid Search: Solving Semantic and Hard Filters

Prerequisite: Familiarity with the concepts introduced in Part 2 — Ingestion Chunking. Review it first if the terminology in this part is unfamiliar. In Part 2: Data Ingestion & Atomic Chunking - Bringing Product Data into the AI Environment, we established a clean data synchronization pipeline from PostgreSQL to Qdrant via Kafka CDC. But the journey of building a standard e-commerce search engine has just begun. When a user enters: “Asus ROG Zephyrus G14 laptop under $1500 in stock” ...

May 22, 2026 · 7 min · Lê Tuấn Anh

Building a Custom Go Vector DB Engine with HNSW & SIMD

Building a Custom Golang Vector Database Engine with HNSW Building a custom Go vector database engine with HNSW combines 256-bit SIMD AVX2 loop unrolling, off-heap mmap zero-GC slab memory, and Product Quantization (PQ-32) to get high recall at low latency while cutting vector RAM footprint dramatically. This post covers: How to bypass Go bounds checking and force AVX2 vectorization in pure Go using unsafe.Pointer loop unrolling without assembly maintenance overhead. Why naive Go pointer-based graph data structures trigger catastrophic GC pause spikes at 1M+ vectors—and how mmap off-heap slab allocation solves it. How to implement Asymmetric Distance Computation (ADC) lookup tables for Product Quantization to evaluate distance in $O(m)$ byte additions instead of $O(d)$ floating-point multiplications. Fine-grained lockless graph traversal strategies using atomic.Pointer to achieve concurrent write/read throughput without lock contention on high-degree node layers. 1. Vector Search Mathematics & Why Go Needs a Native Engine Modern Artificial Intelligence applications—from retrieval-augmented generation (RAG) to multimodal recommendation systems—depend fundamentally on high-dimensional vector search. Vectors represent semantic embeddings generated by neural networks (e.g., OpenAI text-embedding-3-large at 1,536 dimensions or Cohere embed-v3 at 768 dimensions). Searching for contextually relevant data requires discovering the $k$-Nearest Neighbors ($k$-NN) of a target query vector $\mathbf{q}$ within a dataset $S$ of $N$ vectors. ...

July 23, 2026 · 28 min · Lê Tuấn Anh