use new array search syntax for contributors and identifiers
CSP Request Details
CSP Rejection Details
CSP Approved
Description
Environment
Potential Workaround
blocks
is blocked by
relates to
Checklist
hideTestRail: Results
Activity

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 AMEdited
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 PMEdited
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.
Details
Details
Assignee
Reporter

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