[MGNLUI-4280] Any JCR container searches for all registered node types Created: 25/Aug/17  Updated: 08/Mar/21  Resolved: 08/Mar/21

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

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)

 Description   

info.magnolia.ui.workbench.container.AbstractJcrContainer#findSearchableNodeTypes takes all node types into account, making the query unnecessary complicated:

select * from [nt:base] as t where (([jcr:primaryType] = 'mgnl:marketing-tag' or [jcr:primaryType] = 'mgnl:role' or [jcr:primaryType] = 'mgnl:rssAggregator' or [jcr:primaryType] = 'mgnl:contact' or [jcr:primaryType] = 'mgnl:systemMessage' or [jcr:primaryType] = 'mgnl:segment' or [jcr:primaryType] = 'mgnl:tag' or [jcr:primaryType] = 'mgnl:user' or [jcr:primaryType] = 'mgnl:componentVariants' or [jcr:primaryType] = 'mgnl:siteMap' or [jcr:primaryType] = 'mgnl:page' or [jcr:primaryType] = 'mgnl:category' or [jcr:primaryType] = 'mgnl:group' or [jcr:primaryType] = 'mgnl:persona' or [jcr:primaryType] = 'mgnl:variants' or [jcr:primaryType] = 'mgnl:content' or [jcr:primaryType] = 'mgnl:item' or [jcr:primaryType] = 'mgnl:folder') and (lower(localname()) LIKE 'tes%' or t.['tes'] IS NOT NULL or contains(t.*, 'tes')) )

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