Deploy Typesense NL Search

Turn plain-English queries into filtered searches

Deploy Typesense NL Search

Just deployed

Deploy and Host self hosted Typesense NL Search (Natural Language Search with LLMs) on Railway

Typesense NL Search turns a query like "red running shoes under 100 dollars" into a normal filtered search on your own Typesense.

About Hosting Typesense NL Search open-source software on Railway (self hosted Typesense template)

Your schema, indexed records, and NL model registrations sit in your own Typesense data volume, so you own them rather than Railway's control plane.

TYPESENSE_DATA_DIR points at the Railway volume, so restarts keep your collections.

Why Deploy Typesense NL Search, the Algolia NeuralSearch alternative on Railway (Railway Free Trial)

Algolia NeuralSearch is a polished hosted product, and if you want zero infrastructure it's a fair pick.

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 NL 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 NL Search self hosting

Typesense NL Search needs a node, a volume and a public HTTPS domain, so hosting choice decides how much upkeep you take on.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanThe Shinyduo/typesense-railway repo deployed with Caddy, a volume and a public domain wired.A Droplet you run yourself: Docker, TLS and upgrades are on you.
AWSOne service, one volume and one domain, with no VPC to design first.Full control of instances and networking, but slower setup and harder bill prediction.
HetznerVariables preset, so you skip SSH and get an endpoint fast.Low price for dedicated RAM, but you own the proxy, backups and restarts.

Pick Railway when you want NL search running today, and a VPS when RAM cost matters more than your time.

Common Use Cases for hosted Typesense NL Search

  • Shopping search with sentence queries. A shopper types "red running shoes under 100 dollars" and expects results. Typesense NL Search turns that into a cleaned q, a color filter, a price filter and a sort.
  • Support and ticket archives. Agents search "laptops from last quarter with a broken screen" instead of product codes. Facet status, product and date fields so the LLM has real values to map onto.
  • Listings with numeric limits. Phrases like "two bedrooms near the station, under 2000" break keyword search. Facet bedrooms and price so the generated filters match.
  • Help centers with a safety net. Send only sentence-length queries through nl_query=true and keep short ones on keyword search. If the LLM call fails, Typesense falls back to the raw q.
  • Apps that cache aggressively. Each natural language query is one billed LLM call. Cache popular queries in your app early, before traffic makes the invoice a surprise.

Dependencies for Typesense NL Search Docker hosted on Railway

Typesense NL Search is a small stack, and most friction comes from one piece quietly missing.

Deployment Dependencies for Managed Typesense NL Search Service (Natural Language Query Search)

Attach a Railway volume first.

Implementation Details for Typesense NL Search (Using Typesense official docker image)

The natural language feature ships inside the Typesense 30 engine, so there is no plugin to install.

How does Typesense NL Search compare against other natural language search engines platforms

Most teams asking this want to know which product turns "red running shoes under 100 dollars" into filters without a rules engine.

Typesense NL Search vs Algolia NeuralSearch (Algolia NeuralSearch Alternative)

  • Hosting: Algolia NeuralSearch is closed and hosted, so your catalog and query logs live on their side. Typesense NL Search runs on your Railway project or VPS under GPL-3.0.
  • Search model: Algolia blends keyword and vector retrieval in one managed pipeline. Typesense uses the LLM only to parse intent into filters, which keeps the search easy to inspect.
  • Where Algolia wins: if you want turnkey tuning and a vendor owning relevance, it is less work, though you give up portability.

Typesense NL Search vs Elasticsearch (Elasticsearch Alternative)

  • Assembly: Elasticsearch can do this through inference APIs or a custom step in front of the query. Typesense NL Search handles the whole path in one endpoint with nl_query=true.
  • Operations: Elasticsearch brings JVM tuning and shard planning. Typesense is a single binary that keeps the index in memory and runs well on a small node.
  • Where Elasticsearch wins: with a large existing cluster, heavy log analytics, or custom scoring, it offers far more knobs.

Typesense NL Search vs Meilisearch (Meilisearch Alternative)

  • AI features: Meilisearch offers hybrid search that mixes semantic and keyword results. Typesense NL Search turns the sentence into explicit filters you can read in parsed_nl_query.
  • Explainability: generated_params and nl_query_debug=true show what the model asked for, which helps when someone asks why a result was filtered out.
  • Where Meilisearch wins: if semantic similarity matters more than precise facet filters, its hybrid approach may suit you better.

Typesense NL Search vs Vespa (Vespa Alternative)

  • Scope: Vespa is a capable self-hostable engine for ranking and large vector workloads, but you build the LLM step yourself, including prompts, caching and fallbacks.
  • Speed to working: Typesense NL Search gives you schema-aware parsing, a prompt cache and a raw-query fallback out of the box.
  • Where Vespa wins: for large custom ranking pipelines and ML-heavy relevance work, Vespa offers depth this template does not try to match.

How to use Typesense NL Search (the OSS Natural Language Query Search)?

Day one is mostly a few API calls, and the model registration has to come first.

  1. Replace the placeholder TYPESENSE_API_KEY with your own long random value in Railway. Create a collection and mark filterable fields such as category, color, brand and price as facet true so the LLM sees real values.

  2. Register a model with POST to /nl_search_models, sending an id, a provider-prefixed model_name such as google/gemini-2.5-flash, your api_key, and optional temperature.

  3. Search with nl_query=true, nl_model_id set to that id, plus q and query_by. Send requests to TYPESENSE_PUBLIC_URL with the X-TYPESENSE-API-KEY header.

  4. Check parsed_nl_query to see the generated q, filter_by and sort_by. Set nl_query_debug=true while tuning. Any filter_by you pass is ANDed with the generated filters.

  5. Expect a slower first request per collection, since the schema prompt is cached for 86400 seconds. If the LLM call fails, Typesense falls back to your raw q. Cache popular queries, because each one is a billed LLM call.

How to self host Typesense NL Search on other VPS Services (Typesense NL Search self hosting guide)

Running this on a plain VPS takes the same three pieces as the Railway template: a Typesense 30 server, a volume for its data, and a reverse proxy for HTTPS.

Clone the Repository

git clone https://github.com/Shinyduo/typesense-railway.git
cd typesense-railway

Install Dependencies

You need Docker and Docker Compose on the VPS. Typesense runs from its official image, and Caddy is built in.

docker --version
docker compose version

Configure Environment Variables

Set these before the first boot. Swap in your own long random API key and your real domain.

TYPESENSE_API_KEY=replace-with-a-long-random-value
TYPESENSE_DATA_DIR=/data
TYPESENSE_PUBLIC_URL=https://your-domain.example.com
TYPESENSE_URL=http://localhost:8080
TYPESENSE_THREAD_POOL_SIZE=64
TYPESENSE_NUM_COLLECTIONS_PARALLEL_LOAD=32
PORT=8080

Send API calls to the public URL with the X-TYPESENSE-API-KEY header. Keep your LLM provider key on the server, never in a browser.

Start the Typesense NL Search Application

docker compose up -d --build
curl -H "X-TYPESENSE-API-KEY: $TYPESENSE_API_KEY" https://your-domain.example.com/health

On Railway, the build, persistent volume, HTTPS domain, and restarts are wired up for you.

Official Pricing of Typesense NL Search (Typesense NL Search pricing)

Typesense is free and open source under GPL-3.0, so there's no license fee for the natural language layer. Typesense adds no per-query surcharge of its own.

Typesense NL Search cloud vs self hosted comparison (Pricing, features, costs, and more)

Typesense NL Search is open source, so you pay for the server plus your LLM provider's per-query bill.

Monthly cost of self hosting Typesense NL Search on Railway

On Railway you pay for compute and the attached volume, usually single-digit to low-teens USD per month for a small node.

System Requirements for Hosting Typesense NL Search on a VPS

Typesense holds the index in RAM, so size memory to your dataset first. Give it a few vCPUs and keep the API key out of browser code.

Frequently Asked Questions (FAQs)

Do I need a separate LLM account for Typesense NL Search?

Yes. You pay that provider per call.

What happens if the LLM call fails?

Typesense falls back to a normal keyword search using the raw q, so users still get results.

Why is the first natural language query slow?

The first request on a collection collects facet values and builds the schema prompt. Run a test query right after indexing to warm it up.

Can I see what the LLM generated?

Yes. Add nl_query_debug=true while tuning, then remove it in production.

Which API key should the frontend use?

Not your admin key.

Should every search go through the LLM?

No.


Template Content

More templates in this category

View Template
NEW
Plausible WordPress
Cookie-free WordPress stats from your own Plausible

onepush
0
View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
2