JKHeadley / JKHeadley/rest-hapi
Sorting, filtering and term search for a nested property not working
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Sorting, filtering and term search for a nested property not working
**To Reproduce**
Steps to reproduce the behavior:
See the JSON model at http://www.objgen.com/json/models/6mT5A and the way how it works in MongoDB in images attached.
Properties inside array are specified with .(dot) notation. It works for both filter, projection and sorting too
**Expected behavior**
Sorting, filtering and term search should be supported as in MongoDB
**Screenshots**


**Desktop (please complete the following information):**
- OS: Windows 10
- Browser: Chrome
- Version: 69.0
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
https://twitter.com/iamcoolgeek/status/1045871137333207040
Contributor guide
Research direction
Begin with the linked JSON model and the MongoDB examples, then reproduce sorting, filtering, and term search for properties inside arrays using dot notation. Compare the current behavior with MongoDB; done means all three operations support the nested-property notation consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- api, backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100