Prompt
Building app search without running infrastructure
Latest observation
If you want app search without operating infrastructure, the main goal is usually: don’t run your own search cluster.
Here are the common approaches, from most “fully managed” to most lightweight:
1) Use a hosted search service
Best if you want full-text search, typo tolerance, filtering, ranking, analytics, etc.
Popular options:
- Algolia — very easy to integrate, great developer experience, fast relevance tuning
- Meilisearch Cloud — simpler/open-source-friendly search with hosted option
- Typesense Cloud — similar to Meilisearch, good for app search
- Elastic Cloud — powerful, more complex
- Azure AI Search / AWS OpenSearch Service — managed by cloud vendor
Pros
- No servers to manage
- Scaling, replication, backups handled for you
- Fast to ship
Cons
- Costs can grow with data/query volume
- Vendor lock-in
- Some services are expensive for large datasets
2) Use your database’s built-in search
If your app is smaller or search needs are modest, this is often the simplest approach.
Examples:
- Postgres full-text search
- Postgres trigram search
- SQLite FTS5
- MongoDB text search (less common for app search, but usable)
Pros
- No extra infrastructure
- One data source
- Easy consistency with your primary records
Cons
- Less powerful relevance tuning
- Faceting, typo tolerance, and ranking can be limited
- Search performance may degrade as complexity grows
3) Use an embedded/local search engine with a managed platform
If you want no infrastructure but still need search-specific capabilities:
- Lunr.js / MiniSearch for client-side or small datasets
- SQLite FTS5 if you already have SQLite
- Edge/local indexing patterns with serverless functions
Good for:
- Static sites
- Small catalogs
- Offline-capable apps
4) Serverless search pattern
You can build search on:
- Serverless functions
- Managed DB
- Managed vector/text search
Typical architecture:
- App writes to primary DB
- DB change feeds or background jobs update search index
- Queries go to managed search service
- No always-on app infrastructure
This reduces ops, but you still need some glue for indexing.
Recommendation by app type
If you want the fastest path:
Algolia or Typesense Cloud
If you want low cost and simplicity:
Postgres full-text search
If you want open-source feel with managed hosting:
Meilisearch Cloud or Typesense Cloud
If your search is mostly “find records”:
Database search is often enough
Practical choice guide
Ask:
- How many documents?
- Do you need typo tolerance?
- Do you need filters/facets?
- Do you need autocomplete?
- How much can search cost?
- Do you need relevance tuning?
Rule of thumb
- < 100k records and simple search: Postgres/SQLite FTS
- Need app-quality search UX: hosted search service
- Large, complex, enterprise use case: Algolia/Elastic Cloud/OpenSearch
A simple architecture
For a typical app:
- Primary DB: Postgres
- Search: Algolia / Meilisearch Cloud / Typesense Cloud
- Sync: background job or webhook on insert/update/delete
- Frontend: search box hits hosted search API directly or through your backend
This gives you search without running search servers yourself.
If you want, I can give you:
- a recommendation matrix,
- a cost comparison, or
- a reference architecture for your specific app stack.