Implement AEM search using query builder API using wildcard-contains in node name

1.8k Views Asked by At

I have a requirement to fetch search results based on partial/wild card in node name to retrieve AEM forms portal data.

For example, if there are multiple draft Id node under any user-email (Unique node created under /conten/forms/fp). each draft application node will reside under conten/forms/fp/.com|.net/metadata/draftId

Note: User nodes will have .com or .net in the end. Image also attached for reference. I should get [email protected]/testsonar%[email protected] as result since the user has more than one draft application.

enter image description here

My requirement is to find out users who are having multiple drafts. Can anyone suggest this would be possible using Query builder API . I have tried below predicate but noticed that wild card is not supporting in path.

type=nt:unstructured
path=/content/forms/fp/*/drafts/metadata
path.exact=false
path.false=false
1

There are 1 best solutions below

0
On

When using predicates you should be able to use something like this:

group.1_property.value=%term%
group.1_property=jcr:path
group.1_property.operation=like