JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
Multi-model search with Elasticsearch
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Start by reviewing the JSONAPI::Resources extension points alongside Chewy and JSONAPI::Utils, then determine whether multi-model autocomplete belongs in a custom index action or an abstract SearchResource. Done means a decided approach for heterogeneous results and consistent serialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, ruby
- Domain
- backend-api-design, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100