Skip to content

Commit

Permalink
MODINVSTOR-1277: Revert removal of identifier array full text index
Browse files Browse the repository at this point in the history
  • Loading branch information
julianladisch committed Mar 4, 2025
1 parent 9bb0f99 commit da24375
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## v29.0.0 YYYY-mm-DD
### Breaking changes
* Upgrade to Java 21 ([MODINVSTOR-1364](https://folio-org.atlassian.net/browse/MODINVSTOR-1364))
* Drop CQL array support for `instance identifiers` field ([MODINVSTOR-1277](https://folio-org.atlassian.net/browse/MODINVSTOR-1277))

### New APIs versions
* Provides `inventory-hierarchy 0.6`
Expand Down Expand Up @@ -29,7 +28,7 @@
* Sort holdings by location name in instanceId query ([MODINVSTOR-1343](https://folio-org.atlassian.net/browse/MODINVSTOR-1343))

### Tech Dept
* Delete 4 unused instance database indexes ([MODINVSTOR-1277](https://folio-org.atlassian.net/browse/MODINVSTOR-1277))
* Delete 3 unused instance database indexes ([MODINVSTOR-1277](https://folio-org.atlassian.net/browse/MODINVSTOR-1277))

### Dependencies
* Bump `LIB_NAME` from `OLD_VERSION` to `NEW_VERSION`
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/db_scripts/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
"fullTextIndex": [
{
"fieldName": "identifiers",
"tOps": "DELETE",
"arraySubfield": "value",
"arrayModifiers": [
"identifierTypeId"
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/org/folio/rest/api/InstanceStorageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,21 @@ public void canSearchForInstancesUsingSimilarQueryToUiLookAheadSearch() {
canSort("title=\"upr*\" or contributors=\"name\": \"upr*\" or identifiers=\"value\": \"upr*\"", "Uprooted");
}

@Test
public void arrayModifierfsIdentifiers1() {
canSort("identifiers = /@value 9781447294146", "Uprooted");
}

@Test
public void arrayModifierfsIdentifiers2() {
canSort("identifiers = /@identifierTypeId = " + UUID_ISBN + " 9781447294146", "Uprooted");
}

@Test
public void arrayModifierfsIdentifiers3() {
canSort("identifiers = /@identifierTypeId " + UUID_ASIN, "Nod");
}

@Test
public void canSearchWithoutSqlInjection() {
create5instances();
Expand Down

0 comments on commit da24375

Please sign in to comment.