Typesense vs Elasticsearch vs OpenSearch: Self-Hosted E-Commerce Search (2026)
The e-commerce search infrastructure conversation shifted in 2026. Three years ago, it was simple: Elasticsearch or Algolia. In 2024, Elastic ended the free tier and AWS forked OpenSearch. The economics changed overnight, and now the calculus is about operational cost, not just features.
The e-commerce search infrastructure conversation shifted in 2026. Three years ago, it was simple: Elasticsearch or Algolia. In 2024, Elastic ended the free tier and AWS forked OpenSearch. The economics changed overnight, and now the calculus is about operational cost, not just features.
Typesense emerged from the noise with a different bet: simple, cloud-native search that you self-host and don't have to think about. For teams building headless commerce stacks, this is worth evaluating seriously.
The Landscape Shifted
Elasticsearch went enterprise-first. Their free tier is capped at 2 nodes, not suitable for production. OpenSearch is free but forked, meaning documentation diverges and AWS controls the roadmap. Typesense is open-source and built from scratch for the cloud-native era.
This isn't a feature comparison anymore. All three handle product search at scale. The question is: who operates it, and how much does that cost?
Comparison Table: Three Platforms, Three Tradeoffs
| Dimension | Typesense | Elasticsearch 8.x | OpenSearch 2.x |
|---|---|---|---|
| License | Open-source (BUSL for enterprise) | Elastic License (proprietary) | SSPL (AWS-backed) |
| Self-Hosting Cost | $100-300/month (small infra) | $500-1500/month (operations) | $300-1000/month (operations) |
| Deployment Time | 10 minutes (Docker) | 2-3 hours (Java, tuning) | 2-3 hours (Java, tuning) |
| Required Ops Knowledge | Minimal (Go binary) | Moderate (JVM, memory tuning) | Moderate (JVM, memory tuning) |
| Indexing Speed (docs/sec) | 15,000-20,000 (single node) | 10,000-15,000 (single node) | 10,000-15,000 (single node) |
| Query Latency (P95) | 45-80ms (typical faceted search) | 30-50ms (optimized) | 30-50ms (optimized) |
| Faceted Search | Native; excellent out-of-box | Requires aggregations config | Requires aggregations config |
| Typo Tolerance | 1-step edit distance (built-in) | Fuzzy queries (complex config) | Fuzzy queries (complex config) |
| Managed Tier | Typesense Cloud ($29+/month) | Elastic Cloud ($95+/month) | Amazon OpenSearch Service (pay-per-node) |
| Learning Curve | Easy (simple API) | Steep (query DSL, mappings) | Steep (copied from Elasticsearch) |
| Scaling Model | Horizontal (replicas); vertical (node size) | Horizontal (shards + replicas); complex tuning | Horizontal (shards + replicas); complex tuning |
Typesense: The Cloud-Native Bet
Typesense is built for teams that want search to be a solved problem. It runs as a single Go binary, stores data to disk or S3, and provides a dead-simple REST API with sensible defaults.
Typesense Strengths
Operational simplicity. No JVM tuning, no memory pools, no shard rebalancing. Deploy a Docker container, point it at your product data, and search works. On a 2-core 4GB machine, Typesense can index 1M+ products and handle thousands of queries per second with a 50ms latency.
Typo tolerance out-of-the-box. Typesense ships with fuzzy matching built in. typsen finds Typesense. ipone finds iPhone. Configure it with a single parameter (enable_typo_tolerance: true); Elasticsearch requires complex fuzzy query DSL.
Faceted search is native. Typesense's data model centers on facets. You define facets when you index; queries return facet counts automatically. E-commerce needs this: filter by price range, brand, color, size, all in one request. Typesense does it; Elasticsearch requires aggregations programming.
Deployment friction is low. Install via Docker, push product data via a simple JSON API, query via REST. Two engineer-hours and you have search. Elasticsearch takes two engineer-days including operational planning.
Cost at scale is transparent. Typesense Cloud (managed) is $29/month base. Self-hosted in Docker on a $10/month VPS runs fine for under 1M products. Scaling to 10M products costs maybe $100/month in infrastructure. Elasticsearch Cloud starts at $95/month and scales exponentially as you add data.
Typesense Weaknesses
Feature parity is narrower. Typesense doesn't have Elasticsearch's advanced ML features (rare, but matter for some teams). No built-in ML ranking, no natural language processing beyond basic fuzzy matching. For basic e-commerce search, this is fine. For Netflix-scale recommendation, you need Elasticsearch or Algolia.
Community is smaller. Elasticsearch has 10 years of Stack Overflow answers. Typesense has 5 years and a smaller community. When you hit edge cases, fewer answers exist.
Managed tier vendor lock-in. Typesense Cloud (the managed offering) is run by the Typesense team. If they vanish, you're self-hosting. No alternative managed hosting ecosystem. Elasticsearch has Elastic Cloud, Elastic Cloud Enterprise, and self-hosted variants.
Advanced analytics are absent. If you need behavioral analytics (what customers search for, what they click), Elasticsearch's monitoring and analytics are richer. Typesense is just search, not a platform.
Elasticsearch 8.x: The Enterprise Standard
Elasticsearch remains the incumbent. Large enterprises (Shopify, Netflix, GitHub) run it. The Query DSL is powerful but steep. Operations are complex but well-documented.
Elasticsearch Strengths
Feature completeness. Boolean queries, scripts, ML ranking, anomaly detection, alerting. If you need sophisticated search logic, Elasticsearch has it. For simple product search, this is overkill; for complex scenarios, it's the right tool.
Community at scale. A decade of documentation, Stack Overflow answers, and production deployments. When you hit a problem, answers usually exist.
Maturity. Elasticsearch has shipped thousands of releases. Edge cases are well-understood. For mission-critical search, this matters.
Observability. Elasticsearch's monitoring, alerting, and analytics are comprehensive. Kibana integrates tightly. For large ops teams, this is valuable.
Elasticsearch Weaknesses
Cost has become prohibitive. Elastic's 2024 licensing shift ended free tier beyond development. Self-hosting is feasible but operationally expensive. A managed Elasticsearch cluster with HA and backups costs $300-500/month minimum. Typesense equivalent costs $30-100/month.
Operational complexity. JVM tuning, memory management, shard rebalancing, mapping migrations. For a five-person engineering team, this friction is real. You're either hiring a search specialist or burning engineer cycles.
Query DSL learning curve. Elasticsearch's query language is powerful but unintuitive. Writing faceted search queries requires knowledge of aggregations, filters, aggs nesting. Typesense's API is a HTTP GET with query parameters.
Slow deployment. Elasticsearch clusters take hours to tune correctly. Memory settings, thread pools, refresh rates, shard counts. Getting this wrong causes latency tail spikes in production.
OpenSearch: The AWS Fork
OpenSearch is Elasticsearch 7.x+ with AWS ownership, open-source licensing, and regular updates. It's free to self-host. It's not free to operate.
OpenSearch Strengths
True open-source. SSPL license means AWS can't suddenly close it. For teams that care about source availability, this is a genuine advantage over Elasticsearch.
AWS integration. If your infrastructure lives in AWS, OpenSearch Service (managed OpenSearch) integrates with CloudWatch, IAM, VPC. Single sign-on, compliance reporting, automated backups. For AWS-native shops, this is convenient.
Elasticsearch compatibility. OpenSearch is a fork, so existing Elasticsearch integrations (Logstash, Kibana alternatives) mostly work. Migration from Elasticsearch is lower friction than to Typesense.
Enterprise features at open-source price. You get security plugins, ML features, and monitoring without Elastic's license costs.
OpenSearch Weaknesses
AWS controls the product. OpenSearch follows AWS's roadmap, not a broader community. Features are driven by AWS use cases, not necessarily e-commerce search. Updates can be unpredictable.
Documentation quality is lower. Forking Elasticsearch means OpenSearch docs diverge. You'll find yourself reading Elasticsearch docs and wondering if it applies. The community is smaller.
Operational complexity matches Elasticsearch. You still have the JVM tuning, shard management, memory pressure. The "free license" doesn't reduce operational cost.
Vendor lock-in to AWS. If you use managed OpenSearch Service, you're committed to AWS. Migrating to another cloud or on-prem is more expensive. Self-hosting OpenSearch works anywhere, but then you lose AWS integrations.
Real-World E-Commerce Scenario
Let's say you're building a headless commerce platform for a mid-market retailer: 5M SKUs, 50K queries/day, need faceted search (price, brand, color, size, availability).
Typesense Self-Hosted
- Infrastructure: 2-node Typesense cluster (replication for HA) on $20/month VPS infrastructure.
- Time to deploy: 4 hours (including data pipeline).
- Indexing time: ~30 minutes for 5M products.
- Query latency: P95 = 60ms average, 150ms on complex faceted queries.
- Monthly cost: $40 (infrastructure) + 10 hours ops/month (~$500 at blended rate).
- Total: ~$540/month for the first engineer; scales well. Second engineer adds 5 hours/month maintenance.
Elasticsearch Self-Hosted
- Infrastructure: 3-node cluster (2 data, 1 coordinating) on proper hardware; $100/month infrastructure.
- Time to deploy: 16 hours (including JVM tuning, memory configuration, shard strategy).
- Indexing time: ~20 minutes for 5M products (slightly faster).
- Query latency: P95 = 40ms average, 100ms on complex queries.
- Monthly cost: $100 (infrastructure) + 30 hours ops/month (monitoring, updates, tuning) = $100 + $1,500 = $1,600/month.
- Total: ~$1,600/month (operational cost dominates).
Elasticsearch Cloud (Managed)
- Infrastructure: Elastic Cloud $300/month for mid-market sizing (3GB RAM, 2 zones).
- Time to deploy: 2 hours (Elastic handles the rest).
- Indexing time: ~20 minutes for 5M products.
- Query latency: P95 = 40ms average, 100ms on complex queries.
- Monthly cost: $300 (Elastic) + 5 hours ops/month (minimal; Elastic manages it) = $300 + $250 = $550/month.
- Total: ~$550/month.
Typesense Cloud (Managed)
- Infrastructure: Typesense Cloud $29/month base + $0.50 per GB stored = ~$40/month for 5M products.
- Time to deploy: 1 hour (Typesense Cloud handles the rest).
- Indexing time: ~30 minutes for 5M products.
- Query latency: P95 = 60ms average, 150ms on complex queries.
- Monthly cost: $40 (Typesense) + 2 hours ops/month (data syncing, pipeline monitoring) = $40 + $100 = $140/month.
- Total: ~$140/month.
Decision Matrix: When to Choose Each
Choose Typesense if:
- You're building a greenfield e-commerce platform and want to minimize operational burden.
- Your product catalog is under 100M SKUs (Typesense is practical up to that scale).
- Your search requirements are standard faceted search (price, brand, category, filters).
- You have one or two engineers responsible for search; ops complexity matters.
- You want transparency in cost (pay for compute, not for Elastic's licensing).
Choose Elasticsearch if:
- You need ML ranking, anomaly detection, or sophisticated text analysis.
- You already have Elasticsearch running (migration cost is high; stay).
- Your team has search expertise and operations is not a constraint.
- You're using Elasticsearch Cloud and the $300+/month cost is acceptable.
Choose OpenSearch if:
- You're on AWS and need native integration (VPC, IAM, CloudWatch).
- You want Elasticsearch features without Elastic's licensing cost.
- You're self-hosting and can absorb the operational complexity.
- You're concerned about Elastic's licensing roadmap and want open-source guarantees.
Integration Pattern for Headless Commerce
Most Contra Collective projects use this pattern:
Typesense for user-facing search (fast, simple, cheap) + Elasticsearch or OpenSearch for analytics (expensive, rich, optional).
Services:
- Typesense (product search, facets, autocomplete)
- Elasticsearch (optional; logs, events, analytics; not required for commerce)
- Vector search layer (optional; for AI-powered "find similar" or recommendations)
Typesense handles 99% of the search volume. If you need analytics (what are customers searching for, what queries have zero results?), run a side log pipeline to Elasticsearch. Separate concerns, separate cost centers.
Deployment Checklist for Typesense
# 1. Deploy Typesense (Docker)
docker run -d \
-p 8108:8108 \
-v typesense-data:/data \
typesense/typesense:latest \
--data-dir=/data --api-key=${API_KEY}
# 2. Create collection (schema)
curl -X POST http://localhost:8108/collections \
-H "X-TYPESENSE-API-KEY: ${API_KEY}" \
-d '{
"name": "products",
"fields": [
{ "name": "id", "type": "string", "facet": false },
{ "name": "name", "type": "string", "facet": false },
{ "name": "price", "type": "int32", "facet": true },
{ "name": "brand", "type": "string", "facet": true }
]
}'
# 3. Bulk index products
curl -X POST http://localhost:8108/collections/products/documents/import?action=create \
-H "X-TYPESENSE-API-KEY: ${API_KEY}" \
--data-binary @products.jsonl
# 4. Query
curl "http://localhost:8108/collections/products/documents/search?q=iphone&filter_by=price:[100..500]&facet_by=brand"
Done. Search is live.
FAQ
Q: Is Typesense suitable for 100M+ SKU catalogs? A: Technically yes, but economics shift. At 100M SKUs, you're running a large cluster; operational complexity increases. Elasticsearch or a specialized large-scale search engine (MeiliSearch if you want simplicity, or Algolia if you want fully managed) are better bets.
Q: Can I migrate from Elasticsearch to Typesense? A: Yes. Typesense has import tooling. Data migration is straightforward (export from Elasticsearch, import to Typesense). Query language is different, so search logic needs rewriting. Plan 40 engineer-hours for a mid-size migration.
Q: How does Typesense handle real-time indexing? A: Typesense writes to a write-ahead log, then applies to the in-memory index. Latency is sub-second for new documents. Elasticsearch is similar. For sub-millisecond indexing, neither is suitable; use a stream processor like Kafka + custom indexing.
Q: What about vector search (semantic search) with Typesense? A: Typesense doesn't have native vector search. Run a separate vector database (Qdrant, Weaviate, Pinecone) for embeddings. Combine exact match (Typesense) with semantic reranking (vector search) for best results.
Q: Is OpenSearch a good alternative to Elasticsearch for e-commerce? A: For operational burden: no. OpenSearch has the same complexity as Elasticsearch 7.x. For cost and licensing: yes. If you're on AWS, managed OpenSearch Service is cheaper than Elastic Cloud. For a five-person team without search expertise, Typesense is still simpler.
When This Applies to Your Stack
If you're building a headless commerce platform or migrating from Algolia to self-hosted search, the infrastructure choice compounds across years of operations. Typesense is the simplest; Elasticsearch is the most capable; OpenSearch is a middle ground.
For most mid-market e-commerce projects, Typesense is the right starting point. Scale it only when you hit its limits; most teams never do.
Contra Collective has implemented search infrastructure across all three platforms. If you're evaluating search engines for a commerce platform, we can help you benchmark against your specific catalog size and query patterns, avoiding the year-long operational costs of over-engineering. Internal link: contact for headless commerce infrastructure consulting
Q: How does search latency impact conversion rate? A: Every 100ms increase in search latency correlates with a ~2-3% drop in conversion on e-commerce sites. Faceted search is latency-sensitive. Typesense's 60ms typical latency is acceptable; Elasticsearch's 40ms is better. If your search is slower than 200ms, customers perceive it as slow and move to competing sites.
Q: Should I cache search results? A: Yes, aggressively. Cache facet counts and top-10 results for common queries (via Redis or Memcached). Cache miss goes to Typesense/Elasticsearch; hit is sub-millisecond. For a retailer with seasonal search patterns, caching cuts database load by 60-70%.
Q: How do I handle multilingual search (English, Spanish, French)? A: Elasticsearch and OpenSearch have language-specific analyzers (excellent for this). Typesense supports basic language analyzers but is weaker at multilingual nuance. If you need sophisticated multilingual search, Elasticsearch is safer.
More from the lab.
Stytch vs Magic.link: Passwordless Authentication for Modern Web Apps
Passwords are a UX tax. Every password a user creates is a support ticket waiting to happen, a security incident in the making, and a checkout abandonment rate line item your e-commerce analytics will eventually surface. The industry has known this for years. Passwordless authentication, once a niche experiment, is now table stakes for consumer-facing applications that care about conversion.
Cognito vs Clerk: AWS Native Auth vs Developer-First Identity in 2026
AWS Cognito is one of the most widely used authentication services in the world, and one of the most frequently replaced. Its usage stats reflect the gravitational pull of the AWS ecosystem. Its replacement frequency reflects something more honest about its developer experience. Clerk built its entire company on the premise that authentication should feel like a first-party framework feature, not a cloud service you configure through a JSON policy document.
Shopify Plus vs Salesforce Commerce Cloud: 2026 Enterprise Platform Decision
The enterprise commerce platform market has bifurcated sharply. On one side: Salesforce Commerce Cloud, a legacy powerhouse built for complexity and customization at a price that reflects it. On the other: Shopify Plus, a platform that has spent the last four years systematically closing the enterprise feature gap while keeping total cost of ownership radically lower. The question for most brands in 2026 is no longer whether Shopify Plus is enterprise-ready. It is whether SFCC's remaining advantages justify its cost.