[MGNLPER-217] Can not search with single quote ' Created: 15/Jan/24  Updated: 15/Jan/24

Status: Open
Project: Periscope
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Minh Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File screenshot-1.png     PNG File screenshot-2.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Description:
We are not able to search for "Daniela D'Andrea" via search bar.
some variant like "D'Andrea", DAndrea also returns no result.

AC: search result should return if query includes single quote '

Dev Note:
Node saved as:
/ROMDAA_/ROMDAA/lastName=D'Andrea
/ROMDAA_/ROMDAA/firstName=Daniela

generated query below returning no result (from JcrSearchResultSupplier.sanitizeQueryString:

SELECT * FROM [mgnl:internalProfile] AS t WHERE t.[jcr:primaryType] = 'mgnl:internalProfile' AND (LOWER(LOCALNAME(t)) LIKE '%d\''andrea%' OR CONTAINS(t.*, 'd\''andrea'))

I found workaround by removing \

SELECT * FROM [mgnl:internalProfile] AS t WHERE t.[jcr:primaryType] = 'mgnl:internalProfile' AND (LOWER(LOCALNAME(t)) LIKE '%d''andrea%' OR CONTAINS(t.*, 'd''andrea'))



Generated at Mon Feb 12 10:29:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.