use new array search syntax for contributors and identifiers

CSP Request Details

None

CSP Rejection Details

None

CSP Approved

None

Description

Use the dedicated search syntax for searching array-of-objects fields (introduced in RMB 26):

1. for contributors: we only search the name subfield the new search should be

contributors =/@name "john smith"

2. for identifiers we should use the following

  • for all identifiers search: identifiers =/@value "123"

  • for isbn search: identifiers =/@value/@identifierTypeId=8261054f-be78-422d-bd51-4ed9f33c3422 "123"

  • for issn search: identifiers =/@value/@identifierTypeId=913300b2-03ed-469a-8179-c1092c991227 "123"

(Note that we use @value here as well, for consistency)

More details on the new search syntax: RMB-380
Official documentation about the /@ array search syntax: https://github.com/folio-org/raml-module-builder/tree/master/cql2pgjson#-relation-modifiers-for-array-searches

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Jakub Skoczen July 8, 2019 at 2:16 PM

it should fix all those issues.

Charlotte Whitt July 8, 2019 at 12:48 PM

I might be coming in a bit late, with this comment, but when searching on Identifiers, we also need to be able to do right truncation, search on numbers with hypens, having {}, () and [] and other symbols - see: , , and

Jakub Skoczen July 8, 2019 at 10:18 AM
Edited

1. Is it true that using both @value and @name is optional if mod-inventory-storage schema.json is updated with arraySubfield: value for identifiers and arraySubfield: name for contributors? (Answer has confirmed that we need AT LEAST 1 array modifier to be present in the query to trigger the new functionality, otherwise we would be breaking compatibility)

2. You recommend using =, which makes sense to me, but neither identfiers nor contributors has a fullTextIndex specified in schema.json – does it need to be added? (Answer: yes, and MODINVSTOR-311 has been created for that purpose)

Adam Dickmeiss July 5, 2019 at 2:42 PM
Edited

Almost agreet .. I sort of regret that @value or @name where not applied automatically without array modifiers. But that's how it is when you want to keep existing behavior. (I changed the description)

Use = for all searches. (and full-text / = .. allows right truncation too).

Julian Ladisch July 5, 2019 at 1:19 PM

For contributors we need =/@name otherwise it matched feed and deed in the uuid or true or false in primary or some free text in contributorTypeText:

For identifiers we must ensure that we do not match any UUID substring like deed or feed that may occur in the identifierTypeId.
For all identifiers search: identifiers ==/@value "123"
For isbn search: identifiers ==/@identifierTypeId=8261054f-be78-422d-bd51-4ed9f33c3422/@value "123"
for issn search: identifiers ==/@identifierTypeId=913300b2-03ed-469a-8179-c1092c991227/@value "123"
For identifiers we don't want substring word match therefore we need == and not =. Using == allows right truncation, for example identifiers ==/@value "123*"
The modifier value does not need quotes.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Prokopovych

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created July 5, 2019 at 8:01 AM
Updated July 9, 2019 at 11:03 AM
Resolved July 9, 2019 at 10:59 AM
TestRail: Cases
TestRail: Runs