JKHeadley / JKHeadley/rest-hapi

Sorting, filtering and term search for a nested property not working

Open
#148 1 comment 1 reaction 0 assignees View on GitHub
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**
![filter_object](https://user-images.githubusercontent.com/2630384/46350879-8b92ea00-c673-11e8-8492-b2a33cca8f58.PNG)
![objects](https://user-images.githubusercontent.com/2630384/46350881-8c2b8080-c673-11e8-9740-775839e07d86.PNG)

**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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.