๐ Step 1: Get your API key
Youโll use a project API key from LambdaDB Cloud starting in Step 3.LambdaDB Cloud is in public preview.
- Sign in to LambdaDB Cloud โ Open app.lambdadb.ai, sign up if needed, and sign in.
- Create a project โ Accounts without a payment method are on the Free plan. Choose an AWS region that fits your latency or data-residency needs.
- Copy your project API key โ The API key is shown only once after the project is created. Store it somewhere safe, then use it with the base URL and project name from the console starting in Step 3.
LambdaDB Cloud uses region-specific API base URLs. Use the base URL, project name, and project API key shown for your project in the LambdaDB Cloud console. Do not assume a global default URL or a fixed project name.
The Free plan includes monthly read, write, storage, and inference usage at no cost. Add a payment method when you need Standard plan usage beyond the Free plan limits. See Understanding costs.
Keep your API key out of source control and prefer environment variables instead of hardcoding it in scripts.
๐ Step 2: Install the SDK
The LambdaDB SDK provides convenient access to the LambdaDB APIs.๐ Step 3: Create a collection
A collection is where youโll store your documents and define how they should be indexed for search. LambdaDB supports 9 different index types: text, keyword, long, double, boolean, object, datetime, dense vector, and sparse vector. Letโs create a collection that combines text search with vector similarity:- Text field: Supports multilingual search with English and Korean analyzers.
- Vector field: 10-dimensional vectors using cosine similarity.
- Keyword field: Added to support exact match filtering.
๐ Step 4: Add documents
Now letโs add some sample documents. Each document contains text for full-text search, keywords for filtering, and vectors for similarity search:- Upsert behavior: Documents with the same ID will be replaced; new IDs create new documents.
- Auto-generated IDs: If you donโt provide an ID, one will be generated automatically.
- Bulk operations: For large-scale document ingestion (5MB+), use the bulk-upsert functionality.
- Configurable consistency: LambdaDB is eventually consistent by default, so there can be a slight delay before new or changed documents are visible to queries.
If your application requires strong (read-after-write) consistency, set
consistentRead(orconsistent_readin Python) totruewhen you query or fetch data from a collection.
๐ Step 5: Full-text search
Letโs search for documents that match โI hate managing serversโ while filtering for documents tagged exactly with โserverlessโ. This demonstrates LambdaDBโs powerful query capabilities:๐ Step 6: Hybrid search
Now letโs combine full-text search with vector similarity for more comprehensive results. This is where LambdaDB really shines:rrf(Reciprocal Rank Fusion): Great for combining rankings from different search methodsl2(L2 Normalization): Normalizes scores using L2 normmm(Min-Max Normalization): Simple linear scaling to 0-1 range
๐งน Step 7: Clean up
When youโre finished experimenting, clean up your resources:๐ Next steps
- Advanced Queries: Explore complex patterns in our Query Guide
- Bulk Operations: Learn about large-scale data ingestion in our Bulk Operations Guide
- API Reference: Comprehensive documentation at our API Reference