chewy
1,900
Stars
374
Forks
142
Watchers
4
Open Issues
MIT
许可证
Ruby
语言
2013-12-09
创建时间
2026-11-11
最近更新
项目能做什么
基于官方 elasticsearch-ruby 客户端的高级 Elasticsearch Ruby 框架。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
[](http://badge.fury.io/rb/chewy)
[](https://github.com/toptal/chewy/actions/workflows/ruby.yml)
[](https://score.getplumber.io/github.com/toptal/chewy)
# Chewy
Chewy is an ODM (Object Document Mapper), built on top of [the official Elasticsearch client](https://github.com/elastic/elasticsearch-ruby).
## Why Chewy?
In this section we'll cover why you might want to use Chewy instead of the official `elasticsearch-ruby` client gem.
* Every index is observable by all the related models.
Most of the indexed models are related to each other and sometimes it is necessary to denormalize this related data and put it in the same object. For example, you need to index an array of tags together with an article. Chewy allows you to specify an updateable index for every model separately - so corresponding articles will be reindexed on any tag update.
* Bulk import everywhere.
Chewy utilizes the bulk ES API for full reindexing or index updates. It also uses atomic updates. All the changed objects are collected inside the atomic block and the index is updated once at the end with all the collected objects. See `Chewy.strategy(:atomic)` for more details.
* Powerful querying DSL.
Chewy has an ActiveRecord-style query DSL. It is chainable, mergeable and lazy, so you can produce queries in the most efficient way. It also has object-oriented query and filter builders.
* Support for ActiveRecord.
Chewy provides out-of-the-box integration with ActiveRecord, including automatic index updates on model changes via `update_index` callbacks.
## Installation
Add this line to your application's `Gemfile`:
gem 'chewy'
And then execute:
$ bundle
Or install it yourself as:
$ gem install chewy
## Compatibility
Chewy aims to support all Ruby and Rails versions that are currently maintained by their respective teams. When a version reaches end-of-life, we may drop support for it in a future release.
### Ruby
Chewy is compatible with MRI 3.2-4.0.
### Elasticsearch compatibility matrix
| Chewy version | Elasticsearch version |
| ------------- | ---------------------------------- |
| 8.0.x | 8.x |
| 7.2.x | 7.x |
| 7.1.x | 7.x |
| 7.0.x | 6.8, 7.x |
| 6.0.0 | 5.x, 6.x |
| 5.x | 5.x, limited support for 1.x & 2.x |
**Important:** Chewy doesn't follow SemVer, so you should always
check the release notes before upgrading. The major version is linked to the
newest supported Elasticsearch and the minor version bumps may include breaking changes.
See our [migration guide](migration_guide.md) for detailed upgrade instructions between
阅读完整原文
项目深度分析 规则生成(AI 未配置)
综合评分 43.1 分。该项目在“个人可实施性”维度得 45 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。
面向细分需求的二次开发产品
| 产品构想 | 基于 chewy 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| averell23/chewy_kiqqer | 中文介绍暂未生成 | 27 | Ruby |
| nbulaj/capistrano-chewy | 中文介绍暂未生成 Chewy tasks and Elasticsearch indexes management with Capist |
14 | Ruby |
| ChewyMoon/ChewyMoonScripts | 中文介绍暂未生成 Some useful assemblies for LeagueSharp! |
7 | C# |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2013-12-09,近 30 天仍在推送,发布过 33 个 Release |
| 社区活跃 | Star 1,900 / Fork 374 / Issue 4(数据支持,可自行核实) |
| 许可证 | MIT |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/toptal/chewy.git cd chewy docker compose up -d # 或参考 README 中的 docker run 命令
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。