# toptal/chewy

High-level Elasticsearch Ruby framework based on the official elasticsearch-ruby client

Repository: https://github.com/toptal/chewy
Canonical: https://ross.abutalabs.com/products/chewy
Language: Ruby
License: MIT
License Family: permissive
Topics: elasticsearch, elasticsearch-client, ruby
Last push: 2026-08-26T09:02:34+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 89, longevity 100
- inputs: {"age_days": 4650, "days_push": 7, "days_rel": 75, "gap_med": 3.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1901, forks 375 (observed 2026-08-28T04:05:51.659436+00:00)

## What it is
Chewy is a high-level Elasticsearch ODM (Object Document Mapper) for Ruby, built on top of the official elasticsearch-ruby client. It provides ActiveRecord-style index definitions, automatic index updates on model changes, bulk/atomic reindexing, and a chainable query DSL.

## Use cases
- index ActiveRecord models into Elasticsearch with automatic sync on save
- denormalize related data like tags into a single searchable document
- perform full reindexing using the Elasticsearch bulk API
- build chainable, lazy Elasticsearch queries with an ActiveRecord-like DSL
- keep indexes updated atomically when multiple related models change

## When to choose
- you use Ruby/Rails with ActiveRecord and want idiomatic Elasticsearch integration
- you need automatic index updates triggered by model changes
- you want bulk and atomic reindexing without writing raw client code
- you prefer a query DSL over hand-writing JSON query bodies

## When to avoid
- you use a language other than Ruby
- you need a search engine other than Elasticsearch
- you want a lightweight wrapper and prefer calling the raw Elasticsearch client directly
- you need OpenSearch-specific features outside the supported Elasticsearch versions

## Facets
- artifact type: library
- maturity: active
- function: orm, search-engine, database-driver
- domain: databases, web-development, backend
- platform: ruby
- tags: elasticsearch, odm, activerecord, indexing, rails, search

## Member repositories
- toptal/chewy (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:51.659436+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:11:57.771147+00:00, confidence not recorded.
  - readme: https://github.com/toptal/chewy (fetched 2026-08-28T04:05:51.659436+00:00, sha 1c6b2ee56bc2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
