[CQLPG-24] CQL translator: support Array=String Created: 30/Mar/17  Updated: 03/Apr/19  Resolved: 03/Apr/19

Status: Closed
Project: cql2pgjson
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Julian Ladisch Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: sprint29
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-524 CQL translator: support <> (not equal... Closed
relates to RMB-380 implement new approach for searching ... Closed
relates to CQLPG-27 how to filter on array of string fields Closed
relates to CQLPG-42 Array searches in the FT mode Closed
relates to FOLIO-445 expose full CQL in the User app searc... Closed
relates to FOLIO-1473 Expose full CQL in the Inventory app ... Closed
Sprint:

 Description   

Array=String should match if the Array element exists and the Array contains the element String.
The default modifiers should be /respectCase, /respectAccents, /unmasked.



 Comments   
Comment by Kurt Nordstrom [ 25/May/17 ]

This seems to already be the current behavior. Has this not been explicitly implemented?

Comment by Julian Ladisch [ 29/May/17 ]

The readme says: "For matching the elements of an array use these queries (assuming that lang is either an array or not defined, and assuming an array element value does not contain double quotes)".

So the current behavior can fail if the field can contain double quotes, or if the fields are not strings (e.g. integers).

Instead of "Array = String" there should be some new cql operator, for example "Array arrayelement String".

Comment by Jakub Skoczen [ 13/Dec/17 ]

Let's discuss the syntax before any implementation happens.

Comment by Julian Ladisch [ 13/Dec/17 ]

See https://folio-org.atlassian.net/browse/FOLIO-922 for an example where we need to match two properties of the array element (typeId of ISBN):
select * from diku_mod_inventory_storage.instance where jsonb->'identifiers' @> '[

{"value": "9780552142352", "typeId": "8261054f-be78-422d-bd51-4ed9f33c3422"}

]';

Comment by Jakub Skoczen [ 03/Apr/19 ]

Closing this in favour of RMB-380 Closed

Generated at Thu Feb 08 23:06:28 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.