1
votes

I am using querybuilder debugger and want to do a search where "nodename=.pdf OR nodename=.doc*" and "path=/content/dam/1 OR path=/content/dam/2".

I have been trying to find an example but no luck on the web. What I have below is not quite right - just wondering what I am missing.

The query does work but there is a huge difference in the amount of time that it runs when compared with when I just query using one nodename instead of 2.

Thanks in advance,

Jerry

type=dam:asset
mainasset=true
1_group.p.or=true
1_group.1.nodename=*.pdf
1_group.2.nodename=*.doc*
2_group.p.or=true
2_group.1_path=/content/dam/1
2_group.2_path=/content/dam/2
p.limit=-1
orderby=path

I thought maybe something as simple as this might work but no luck....

type=dam:asset
mainasset=true
group.p.or=true
group.1_nodename=*.doc*
group.1_path=/content/dam/1
group.2_nodename=*.doc*
group.2_path=/content/dam/2
group.3_nodename=*.pdf
group.3_path=/content/dam/1
group.4_nodename=*.pdf
group.4_path=/content/dam/2
p.limit=-1
orderby=path
1
Did you try with SQL2 syntax as well?ronnyfm
Hi ronnyfm, No, just the code that I posted. Our programmer said that when we update to AEM 6.5 (we are currently using AEM 6.2), the advanced query will run much faster (he tried it in a test environment) - no idea why though.jerryle

1 Answers

0
votes

Try splitting your query if this won't affect the behaviour you're trying to achieve.

path=/content/dam/1
type=dam:asset
mainasset=true
group.1.nodename=*.pdf
group.2.nodename=*.doc*
p.limit=-1
orderby=path
path=/content/dam/2
type=dam:asset
mainasset=true
group.1.nodename=*.pdf
group.2.nodename=*.doc*
p.limit=-1
orderby=path