[LIBFQMQUER-2] Add CONTAINS operator to handle arrays Created: 18/Sep/23 Updated: 27/Sep/23 Resolved: 27/Sep/23 |
|
| Status: | Closed |
| Project: | lib-fqm-query-processor |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | Bobby Sharp | Assignee: | Kathleen Moore |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Attachments: |
|
| Sprint: | Corsair Sprint 174, Corsair Sprint 175 |
| Story Points: | 0.5 |
| Development Team: | Corsair |
| Release: | Poppy (R2 2023) |
| RCA Group: | TBD |
| Description |
|
With the introduction of array datatypes, we need to create a new operator to handle queries on array fields. When this story is complete, a user should be able to create a query for array fields with a CONTAINS operator. This operator will return any results for which an array field contains the provided value.
For example, the query "{\"department_ids\":{\"$contains\": \"fe16a756-36d0-4655-868e-f10cc1f2ec48\"}}" should return all users whose department_ids array contains the value "fe16a756-36d0-4655-868e-f10cc1f2ec48". |
| Comments |
| Comment by Bobby Sharp [ 20/Sep/23 ] |
|
Emma_Haroyan This is currently BE only. It can be tested in the corsair-frm environment by making a POST query or POST list request with the above query. Only users whose department_ids array contains the specified value should be returned for the list. |
| Comment by Kriti Jain [ 21/Sep/23 ] |
|
Bobby Sharp, this is working as expected |
| Comment by Emma_Haroyan [ 24/Sep/23 ] |
|
Query - "fqlQuery": "{\"department_ids\":{\"$contains\": \"f08d1eec-1318-4d08-9727-d5f8057318df\"}}" |