
Deploy Typesense Multi-Search
federated multi_search across collections
typesense-railway
Just deployed
Deploy and Host self hosted Typesense Multi-Search (federated / multi-collection search) on Railway
A single POST to /multi_search pulls product cards, docs, and help-center hits into one response—no N+1 calls. Each item in the searches array has its own collection, query_by, filter_by, sort_by, and pagination, so you tune relevance per collection. Run the official typesense/typesense:30.2 image with --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors, expose port 8108, and persist /data on a volume. Never lose TYPESENSE_API_KEY; it gates admin and search-only key creation. Scope a search-only key to products, docs, help and browsers can call multi_search directly.
About Hosting Typesense Multi-Search open-source software on Railway (self hosted Typesense template)
Typesense is GPL-3.0 open source, in-memory, writes snapshots to /data. The Railway template uses typesense/typesense:30.2, port 8108, a persistent volume at /data, and requires TYPESENSE_API_KEY. Add --enable-cors for browser clients. No separate DB, proxy, or queue—one container is the engine. Health check on 8108 waits for memory-mapped recovery before accepting queries.
Why Deploy Typesense Multi-Search, the Algolia multi-index search alternative on Railway (Railway Free Trial)
Algolia forces multiple client calls or server-side fan-out for multi-index search, is SaaS-only, and bills per search and per record. Typesense multi_search sends one HTTP POST with per-collection parameters, no per-search fee, and you self-host on Railway. Pay compute + volume. The Railway $5 GitHub trial covers a small node for real testing. For data residency or source control, Typesense is the alternative.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Typesense Multi-Search on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Typesense Multi-Search self hosting
| Provider | Setup effort | Cost profile | Typesense Multi-Search fit |
|---|---|---|---|
| Railway | Template, attach volume, set one key | Compute + volume; single-digit to low-teens USD/month | Fast iteration, health checks, GitHub deploys |
| DigitalOcean | Manual Docker, firewall, backups | Predictable droplet pricing; manage OS | Good if you already run droplets; more SSH |
| AWS | EC2 + EBS + security groups + IAM | Variable; config overhead high | Compliance-heavy; overkill for one container |
| Hetzner | Manual, bare metal or VM | Very cheap RAM per dollar | Great for large in-memory indexes |
Common Use Cases for hosted Typesense Multi-Search
Storefront + docs + help in one request; multi-tenant SaaS with collection-scoped keys; internal federation across tickets, wiki, code; A/B testing relevance by querying two collections in one call; independent pagination per collection.
Dependencies for Typesense Multi-Search Docker hosted on Railway
No external DB, queue, or cache. Only a persistent volume at /data, TYPESENSE_API_KEY, and enough RAM for all collections. For browser clients, add --enable-cors. Official image typesense/typesense:30.2 includes only the binary. Create a search-only key with documents:search scoped to your collections.
Deployment Dependencies for Managed Typesense Multi-Search Service (open-source search engine)
Railway project, persistent volume attached to /data, TYPESENSE_API_KEY, health check at /health on 8108. No Redis or Postgres. Scale vertically by increasing RAM; horizontal scaling needs replication or client-side sharding.
Implementation Details for Typesense Multi-Search (Using Typesense official docker image)
docker run -p 8108:8108 -v typesense-data:/data \
-e TYPESENSE_API_KEY=your-key \
typesense/typesense:30.2 --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors
Test multi_search:
{"searches":[{"collection":"products","q":"usb","query_by":"name","per_page":5},{"collection":"docs","q":"usb","query_by":"title","per_page":10}]}
Each element can override filter_by, sort_by, include_fields, pagination. Response results matches array order.
How does Typesense Multi-Search compare against other federated and multi-index search platforms
Algolia is SaaS-only, per-search fees; Elasticsearch/OpenSearch need JVM and cluster; Meilisearch similar but less granular control. Typesense: one binary, in-memory, deep per-collection tuning, no per-search cost.
Typesense Multi-Search vs Algolia multi-index (Algolia multi-index Alternative)
Algolia cannot be self-hosted and bills per request/record. Typesense is GPL-3.0, one round-trip, predictable Railway cost. Algolia has better dashboards; Typesense wins on self-host and pricing.
Typesense Multi-Search vs Elasticsearch msearch (Elasticsearch multi-search Alternative)
Both support multiple queries in one request. Elasticsearch is JVM-heavy, cluster-oriented; Typesense single Go binary, low RAM. Elasticsearch better for aggregations; Typesense simpler for federated search.
Typesense Multi-Search vs Meilisearch multi-search (Meilisearch multi-search Alternative)
Meilisearch also has multi-search, single binary, disk-based (less RAM). Typesense keeps indexes in RAM and offers finer filter_by, sort_by, group_by per collection. Both work; Typesense for strict in-memory speed and tuning.
Typesense Multi-Search vs OpenSearch multi-search (OpenSearch multi-search Alternative)
OpenSearch inherits Elasticsearch msearch, JVM cluster overhead. Heavy for just federated search. Typesense one container, one volume, one key, JSON array request. OpenSearch for analytics; Typesense for pure search.
How to use Typesense Multi-Search (the OSS open-source search engine)?
Create collections via POST /collections with admin key. Index docs. Generate search-only key: POST /keys with actions:["documents:search"], collections:["products","docs","help"]. Use that key from frontend to POST /multi_search with the searches array. Check per-result error field on failure.
How to self host Typesense Multi-Search on other VPS Services (Typesense Multi-Search self hosting guide)
Same image, same flags. You manage volume, firewall, supervisor. Steps:
Clone the Repository
Optional: git clone https://github.com/typesense/typesense.git. Pulling the image is enough for most.
Install Dependencies
Docker and docker-compose. No host runtime needed.
Configure Environment Variables
Set TYPESENSE_API_KEY, TYPESENSE_DATA_DIR=/var/lib/typesense, TYPESENSE_ENABLE_CORS=true.
Start the Typesense Multi-Search Application
docker run -d --name typesense -p 8108:8108 -v $TYPESENSE_DATA_DIR:/data \
-e TYPESENSE_API_KEY=$TYPESENSE_API_KEY \
typesense/typesense:30.2 --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors
Check /health, then use same API.
Official Pricing of Typesense Multi-Search (Typesense Multi-Search pricing)
Open source GPL-3.0, free to self-host. Typesense Cloud: dedicated RAM/vCPU hourly + bandwidth; no per-search fee. 0.5 GB burst ~$21.60/month; 2 GB burst ~$43–51/month. Self-host Railway: compute + volume, small node single-digit to low-teens USD. $5 trial covers testing.
Typesense Multi-Search cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud handles snapshots, monitoring, scaling. Self-host gives same endpoint, no per-search fee, full control. Features identical; only ops burden differs.
Monthly cost of self hosting Typesense Multi-Search on Railway
1 GB RAM, 1 vCPU, 2 GB volume: $5–12/month. 300k docs across three collections may need 2 GB RAM: $15–25/month. Cheaper than 0.5 GB Cloud burst if you manage volume. $5 trial covers first month.
System Requirements for Hosting Typesense Multi-Search on a VPS
In-memory: dataset + 20–30% overhead. 1 GB dataset → 1.5 GB RAM, so 2 GB service. 1 vCPU for light, 2 for concurrency. Disk: 2–4x dataset for snapshots. Keep 8108 closed or use search-only key + CORS.
Frequently Asked Questions (FAQs)
Can I use one search-only key for multi_search across product, docs, and help collections without exposing admin access?
Yes. Create key with actions:["documents:search"] and collections:["products","docs","help"]. It can only search those collections. Keep TYPESENSE_API_KEY server-side.
Do I need separate Typesense nodes or containers for each collection in multi_search?
No. One node hosts many collections. multi_search federates across them in one request. Separate nodes only for compliance isolation.
How do I set different relevance parameters per collection in one multi_search call?
Each object in searches has its own query_by, filter_by, sort_by, per_page, etc. No global override.
What happens if one collection is missing or a query fails inside multi_search?
The results array has per-entry error field. Request doesn’t fail entirely; other collections still return hits.
How much RAM do I need on Railway to run multi_search across three collections?
Sum dataset size across collections + 20–30%. Example: 800 MB total → 1.5 GB RAM, so 2 GB service. Watch memory graph after indexing.
Can I test Typesense Multi-Search with the Railway $5 GitHub trial?
Yes. Deploy template, attach volume, set TYPESENSE_API_KEY, wait for health on 8108. Trial covers small node for light testing. Create test collections, index few docs, call /multi_search.
Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load.
Template Content
typesense-railway
Shinyduo/typesense-railway