Searchkick

Intelligent search for Ruby on Rails using Elasticsearch or OpenSearch — provides full-text search with relevance ranking, typo tolerance, autocomplete, and faceted filtering with a clean ActiveRecord-like API. Searchkick features: `searchkick` macro on models, `Agent.search('query')` for full-text search, `Agent.search('query', fields: [:name, :description], boost_by: [:usage_count])` for weighted search, `Agent.search('q', aggs: [:category, :status])` for facets, `Agent.search('ag', match: :word_start)` for autocomplete. Handles Elasticsearch index management (reindex, zero-downtime reindex), search analytics (track clicks and conversions), and personalization. Much simpler than raw Elasticsearch client for Rails.

Evaluated Mar 07, 2026 (0d ago) v5.x
Homepage ↗ Repo ↗ Developer Tools ruby rails elasticsearch opensearch full-text-search search autocomplete facets
⚙ Agent Friendliness
65
/ 100
Can an agent use this?
🔒 Security
84
/ 100
Is it safe for agents?
⚡ Reliability
85
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
90
Error Messages
85
Auth Simplicity
82
Rate Limits
88

🔒 Security

TLS Enforcement
85
Auth Strength
82
Scope Granularity
80
Dep. Hygiene
88
Secret Handling
85

Agent search indexes may contain PII — searchkick_data method controls what gets indexed; never index passwords, API keys, or sensitive agent credentials. Elasticsearch cluster should require auth in production (ELASTICSEARCH_URL with credentials). Consider field-level security for multi-tenant agent search indexes.

⚡ Reliability

Uptime/SLA
85
Version Stability
88
Breaking Changes
85
Error Recovery
82
AF Security Reliability

Best When

Your Rails agent platform needs production-grade full-text search with relevance ranking, typo tolerance, facets, and autocomplete — Searchkick delivers Elasticsearch power with ActiveRecord simplicity.

Avoid When

You only need simple SQL search, you don't want to maintain Elasticsearch infrastructure, or your search requirements are better served by Algolia or Typesense.

Use Cases

  • Full-text agent catalog search — Agent.search(params[:q], fields: [:name, :description, :capabilities], operator: 'or') provides ranked full-text search across agent content with typo tolerance for agent marketplace search
  • Agent autocomplete suggestions — Agent.search(params[:q], match: :word_start, limit: 5, load: false) returns fast autocomplete suggestions without loading ActiveRecord objects for agent search input component
  • Faceted agent filtering — Agent.search('assistant', aggs: [:category, :language, :pricing_model], where: { active: true }) returns both results and category counts for agent catalog facet sidebar
  • Zero-downtime agent index updates — Agent.reindex runs async Searchkick background reindex without downtime; adding new searchkick fields doesn't break live agent search during deployment
  • Agent search analytics — Searchkick.search_model.track({ user_id: current_user.id, searched_id: result.id }) tracks agent search impressions and clicks for relevance tuning

Not For

  • Simple SQL LIKE queries — if agent search only needs case-insensitive name matching, PostgreSQL pg_trgm or Ransack contains predicate avoids Elasticsearch infrastructure overhead
  • Non-Elasticsearch backends — Searchkick requires Elasticsearch or OpenSearch; for Algolia-backed agent search, use algoliasearch-rails; for Typesense, use typesense-rails
  • Geospatial search — while Searchkick supports geo_point fields, complex geographic agent search (radius queries, routing) is better served by raw Elasticsearch geo queries or PostGIS

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: api_key
OAuth: No Scopes: No

Searchkick connects to Elasticsearch/OpenSearch via ELASTICSEARCH_URL env var. Production clusters require auth (API key or basic auth in URL). Use Elastic Cloud credentials via ENV for agent production search.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Searchkick gem is MIT licensed, maintained by Andrew Kane. Elasticsearch hosting (Elastic Cloud, AWS OpenSearch) has separate costs.

Agent Metadata

Pagination
offset
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • searchkick_index must be rebuilt after schema changes — adding new fields to searchkick_data or changing field types requires Agent.reindex; existing index doesn't automatically pick up new agent document fields; search returns nil for new fields until reindex completes
  • where: conditions use Elasticsearch filter, not SQL — Agent.search('assistant', where: { user_id: current_user.id }) is NOT a SQL WHERE; it's an Elasticsearch term filter on indexed data; agent model must include user_id in searchkick_data or filter silently returns empty results
  • load: false avoids N+1 DB queries for autocomplete — Agent.search(q, load: false) returns Searchkick::Results with indexed data but no ActiveRecord objects; accessing attributes not in searchkick_data returns nil; for agent search results needing only name+id, load: false is 10x faster than default load: true
  • Callbacks cause ES write on every model save — searchkick enables after_commit callbacks by default; every agent model update triggers Elasticsearch document update adding ~50-100ms latency; for high-frequency agent updates, use callbacks: :async or callbacks: false with scheduled batch reindex
  • reindex in production needs zero-downtime mode — Agent.reindex uses alias-based zero-downtime reindex by default; if Elasticsearch alias doesn't exist (first run), reindex creates and aliases correctly; on version upgrades requiring mapping changes, always test reindex on staging before production agent search index migration
  • Multi-word query behavior differs by match type — Agent.search('fast agent') with default match: :word returns agents matching 'fast' OR 'agent'; match: :phrase requires exact phrase 'fast agent'; match: :text uses full-text analysis; choose carefully based on agent search UX requirements and test with real queries

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for Searchkick.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6470
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered