Databases / MongoDB
Search and AI
Atlas Search, Voyage embeddings, and vector retrieval.
Photo by chansu shin on Unsplash
Full-text search in MongoDB
Community deployments offer regex and text indexes; Atlas Search adds Lucene- style analyzers, fuzzy matching, and facets. This chapter compares those paths, defines Atlas Search indexes from TypeScript, runs $search locally on Atlas Local, and paginates with searchAfter.
Vector search and embeddings in MongoDB
Semantic search stores embedding vectors next to documents and finds nearest neighbors with $vectorSearch. This chapter generates embeddings through Voyage AI, defines vector indexes on Atlas, runs hybrid queries with $rankFusion, and sketches a small RAG retrieval function in TypeScript.