[MGNLDAM-1081] FullTextSearch in asset chooser uses wrong wildcard Created: 30/Sep/22  Updated: 06/Jun/23

Status: Open
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0.18
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: search, search_results
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
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
Date of First Response:
Epic Link: AuthorX Support
Story Points: 2
Team: AuthorX

 Description   

Steps to reproduce

  1.  Open a page to edit and add an image component
  2.  In the asset chooser, click on the magnifying glass to open full text search
  3. type "div"

Expected results

Assets containing "div" in any of their properties are shown (there are two of them in demo)

Actual results

No results are returned

Workaround

Adding more characters seems to work better. In the example, typing the complete word "diving" would return correctly the two assets

Development notes

The generated query can be seen by setting info.magnolia.dam.jcr.JcrAssetProvider to DEBUG:

SELECT * FROM [nt:base] AS t WHERE t.[jcr:primaryType] = 'mgnl:asset' AND (LOWER(LOCALNAME(t)) LIKE '%div%' OR LOWER(t.caption) LIKE '%div%' OR CONTAINS(t.*, '%div%'))

The usage of wildcar % is meant for LIKE and seems it's not meant for CONTAINS. This can be confirmed by testing same query with both wildcards in JCR tools.

Measure and record the times before the change and after the change in this ticket using the big data environment.


Generated at Mon Feb 12 05:06:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.