[MGNLUI-7084] Filtering in Grid backed by JCR uses wildcards for non string values Created: 04/Apr/22  Updated: 20/Jul/22  Resolved: 10/May/22

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.19, 6.3.0

Type: Improvement Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Alejandro Gomez
Resolution: Done Votes: 0
Labels: nucleus, performance
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 0.75d Time Spent: 0.75d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Relates
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-7126 Check what to change Sub-task Completed Alejandro Gomez  
MGNLUI-7127 Implement the change Sub-task Completed Jaromir Sarf  
MGNLUI-7137 Do performance check Sub-task Completed Adam Siska  
MGNLUI-7138 Code Review & piQA Sub-task Completed Adam Siska  
MGNLUI-7139 Integrate on master Sub-task Completed Adam Siska  
MGNLUI-7140 Final QA on bundle Sub-task Completed Quach Hao Thien  
MGNLUI-7143 Port to cloud Sub-task Completed Adam Siska  
MGNLUI-7145 preintqa on cloud branch Sub-task Closed Quach Hao Thien  
MGNLUI-7146 Final QA on cloud Sub-task Completed Quach Hao Thien  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 9
Story Points: 3
Team: Nucleus

 Description   

The grid does a full-text search for each type, including:

  • String
  • That makes sense
  • Boolean
  • That doesn't make sense, and it doesn't need to be a full-text search.
  • Enum
  • That doesn't make sense, and it doesn't need to be a full-text search.

 

As shown above, a full-text search is unnecessary for all types and can be improved dramatically. It improves the performance quite a lot.

More information via recording: https://magnolia-cms.zoom.us/rec/share/Fkd9YuJdMIyisdTwKIDZh7MDGe3GcKMNWEsXT-1u1mLKsx8-EM65JoiBDhChZfFx.DVTpqAofUU7BsisO

 

 



 Comments   
Comment by Jaromir Sarf [ 14/Apr/22 ]

Discovery completed:

As solution we could add condition to use wildcards for string types only. But there is combobox column Templates in pages app (and maybe some more), which is list of strings and solution won't work for it. For this case could be created followup ticket.

Offered solution:

 

if(filterEntryValue instanceof String){
    value = WILDCARD + value + WILDCARD;
}
final Literal literal = factory.literal(valueFactory.createValue(value)); 

 

 

Comment by Rabie Hayoun [ 22/Apr/22 ]

Please do a quick performance test.

Comment by Quach Hao Thien [ 10/May/22 ]

Release note: JCR Grid filtering only supports wildcards for String value query

Generated at Mon Feb 12 09:42:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.