JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

Multi-model search with Elasticsearch

オープン
#1,035 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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::Resources altogether with JSONAPI::Utils
    • Custom index action that performs the search if autocomplete param is present
  • Or:
    • Add an autocomplete filter to an abstract SearchResource (not entirely sure this will work) that returns a heterogenous array of ActiveRecord models
  • Decorators or custom serializes for search so all records have the same attribute signature

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リポジトリのファイルやテストは指定されていません。まず Chewy および JSONAPI::Utils と併せて JSONAPI::Resources の拡張ポイントを確認し、そのうえで、複数モデルのオートコンプリートをカスタム index アクションに実装すべきか、抽象 SearchResource に実装すべきかを判断してください。異種の結果に対するアプローチと、一貫したシリアライズ方針が決定されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
elasticsearch, ruby
領域
backend-api-design, search
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。