Details
-
Bug
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
26.1.2
-
-
CP: sprint 69
-
3
-
Core: Platform
Description
This CQL query
title=Dell'Emulazione e dell'Influenza
produces this SQL query:
WHERE to_tsvector('simple', f_unaccent(instance.jsonb->>'title')) @@ to_tsquery('simple', f_unaccent('Dell'Emulazione<->e<->dell''Influenza'))
Note that punctuation like Apostrophe and Right Single Quotation Mark (U+2019) are not removed. This cannot match because Postgres' to_tsvector removes them:
select s, to_tsvector('simple', s) from (values('Dell'Emulazione e dell''Influenza')) as t(s); s | to_tsvector ----------------------------------+----------------------------------------------- Dell'Emulazione e dell'Influenza | 'dell':1,4 'e':3 'emulazione':2 'influenza':5
How to fix:
Change the word splitting and ftTerm to work in a similar way as to_tsvector:
https://github.com/folio-org/raml-module-builder/blob/v26.2.0/cql2pgjson/src/main/java/org/folio/cql2pgjson/CQL2PgJSON.java#L671
TestRail: Results
Attachments
Issue Links
- blocks
-
RMB-438 contributor search returns no results when name contains "-"
-
- Closed
-
-
UIIN-594 Title search: Apostrophe/Right Single Quotation Mark (U+2019) not found
-
- Closed
-
-
UIIN-676 Search on titles with apostrophe fails
-
- Closed
-
- duplicates
-
RMB-407 Move ftTerm to Cql2SqlUtil and unit test it
-
- Closed
-
-
RMB-415 queryByLike should warn if caseSensitive / removeAccents to do not match
-
- Closed
-
- relates to
-
RMB-537 f_unaccent single quote fullText tsquery sql injection
-
- Closed
-
-
CIRCSTORE-138 Filtering Requests by Request Status doesn't return any rows
-
- Closed
-
-
RMB-439 Remove "-" token for full search to unblock CIRCSTORE-138
-
- Closed
-
-
RMB-455 do not apply lower for fulltext
-
- Closed
-