All Posts
Engineering May 24, 2026

Typesense vs Elasticsearch vs OpenSearch: Self-Hosted E-Commerce Search (2026)

The managed search ecosystem fractured in 2024. Elasticsearch went fully proprietary (expensive). OpenSearch forked to keep it open (complex). Typesense offers simplicity and low operational overhead. For e-commerce teams choosing between self-hosted search platforms, the decision is no longer about features; it's about who pays for operations.

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.

[ 02 ] — Keep Reading

More from the lab.

Oct 4, 2026 Engineering

NetSuite's Native AI Agents vs Custom MCP Tools: What Actually Moves the Needle in 2026

NetSuite 2026.2 brings Ask Oracle, a conversational assistant for natural language questions over your ERP data, and AI Canvas, a workspace for organizing the scorecards and charts that come out of that conversation. Both ship native, inside the NetSuite Next experience, available now in the United States and Canada. That is real progress on the question teams have been building custom NetSuite integrations to answer for years. It is also not the same question as whether to build a custom Model Context Protocol tool against your own schema, which remains the highest leverage move for anything Ask Oracle was never designed to touch.

Sep 28, 2026 Engineering

Adobe Commerce's September 2026 Storefront Release: What B2B and Headless Teams Need to Verify

Adobe shipped its September 2026 Commerce Storefront release with six changes worth a headless or B2B team's attention: Free Gift Selection, an expanded Payment Services drop in with Google Pay and PayPal Buttons, Multiple Named Wishlists, a shared B2B Company Address Book with role based permissions, accessibility improvements across cart and account, and a reCAPTCHA fix for B2B company registration. Five of these are low risk component updates. The sixth ships with an action item, passing an explicit configuration flag, that will break company registration on B2B enabled backends if a team skips it. This post walks through what shipped, the versions behind it, and a verification checklist to run before this release reaches production.

Sep 28, 2026 Engineering

Claude Code's Permanent 17 Percent Usage Cut: What Changed and How to Budget For It

If your team's Claude Code usage suddenly feels tighter this month, the numbers explain why. A temporary 50 percent weekly limit boost expired on August 31, 2026, and the permanent replacement that took effect September 14 is a 25 percent increase, not a 50 percent one. Anthropic said so directly in its own announcement: compared to the boosted summer level, this works out to a 17 percent reduction in weekly limits on Claude Code. That is an unusually plain admission from a vendor, and it is worth taking at face value rather than decoding it as marketing language. This post lays out the full timeline from May through September, why the separate 5 hour session change does not offset the weekly cut, and three concrete steps for budgeting a team's Claude Code usage against the new permanent ceiling.

Ready when you are

Want to discuss this topic?

Start a Conversation