JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
Multi-model search with Elasticsearch
オープン
まだ誰も着手していません。
- 主要言語
- Ruby
- スター
- 2.3k
- フォーク
- 546
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm beginning to implement autocomplete functionality in an Ember app that searches across a number of models. Has anyone accomplished something similar with JSONAPI::Resources? I'm planning to use the Chewy gem to interface with Elasticsearch.
Currently I'm thinking:
- Either:
- Potentially bypass
JSONAPI::Resourcesaltogether withJSONAPI::Utils - Custom
indexaction that performs the search ifautocompleteparam is present
- Potentially bypass
- Or:
- Add an
autocompletefilter to an abstractSearchResource(not entirely sure this will work) that returns a heterogenous array of ActiveRecord models
- Add an
- Decorators or custom serializes for search so all records have the same attribute signature
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リポジトリのファイルやテストは指定されていません。まず Chewy および JSONAPI::Utils と併せて JSONAPI::Resources の拡張ポイントを確認し、そのうえで、複数モデルのオートコンプリートをカスタム index アクションに実装すべきか、抽象 SearchResource に実装すべきかを判断してください。異種の結果に対するアプローチと、一貫したシリアライズ方針が決定されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- elasticsearch, ruby
- 領域
- backend-api-design, search
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100