diff --git a/NEWS.md b/NEWS.md index df66b67e8..bc2a1e827 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,7 +16,7 @@ * Implement Kafka Event Publishing for Call-Number Type CRUD Operations ([MODINVSTOR-1275](https://folio-org.atlassian.net/browse/MODINVSTOR-1275)) ### Bug fixes -* Description ([ISSUE](https://folio-org.atlassian.net/browse/ISSUE)) +* Add item barcode right truncation search index ([MODINVSTOR-1292](https://folio-org.atlassian.net/browse/MODINVSTOR-1292)) ### Tech Dept * Description ([ISSUE](https://folio-org.atlassian.net/browse/ISSUE)) diff --git a/src/main/resources/templates/db_scripts/createIndexBarcodePattern.sql b/src/main/resources/templates/db_scripts/createIndexBarcodePattern.sql new file mode 100644 index 000000000..36e7ab736 --- /dev/null +++ b/src/main/resources/templates/db_scripts/createIndexBarcodePattern.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS item_barcode_idx_pattern + ON ${myuniversity}_${mymodule}.item (lower(jsonb->>'barcode') text_pattern_ops); diff --git a/src/main/resources/templates/db_scripts/schema.json b/src/main/resources/templates/db_scripts/schema.json index e2c76f3e1..12b5a4ff6 100644 --- a/src/main/resources/templates/db_scripts/schema.json +++ b/src/main/resources/templates/db_scripts/schema.json @@ -1232,6 +1232,11 @@ "run": "after", "snippetPath": "publication-period/migratePublicationPeriod.sql", "fromModuleVersion": "28.0.0" + }, + { + "run": "after", + "snippetPath": "createIndexBarcodePattern.sql", + "fromModuleVersion": "28.0.3" } ] }