I have the below query which is used to get all the images added (in two of the paths) which were created between two dates.
SELECT * FROM [dam:Asset] AS a WHERE ((ISDESCENDANTNODE(a,[/content/dam/wknd/en/site])) OR (ISDESCENDANTNODE(a,[/content/dam/wknd/en/site2]))) AND a.[jcr:created] > CAST('2023-01-29T21:30:00.000Z' AS DATE) AND a.[jcr:created] < CAST('2023-01-30T21:30:00.000Z' AS DATE)
In local the query is working fine and giving results.
But in dev it gives the below error.
The query is already picking an index. I validated that using query manager tool.
I have more than 3 million images residing in one path used in the query and around 100,000 images created between these dates.
How can I optimize this query to give results , even though I have 3 million images in those paths?
Solved! Go to Solution.
Views
Replies
Total Likes
You can try the following
Hi @P_V_Nair
Check if this article helps you: https://blog.developer.adobe.com/optimizing-aem-search-queries-9049d272df3b
Hope it helps!
Thanks,
Kiran Vedantam
You can try the following
Can you try tweaking the query Bit although some more information is needed regarding DEV env
SELECT * FROM [dam:Asset] AS a WHERE ((ISDESCENDANTNODE(a,[/content/dam/wknd/en/site])) (ISDESCENDANTNODE(a,[/content/dam/wknd/en/site2]))) AND a.[jcr:created] > CAST('2023-01-29T21:30:00.000Z' AS DATE) AND a.[jcr:created] < CAST('2023-01-30T21:30:00.000Z' AS DATE)
|
SELECT * FROM [dam:Asset] AS a WHERE (ISDESCENDANTNODE(a,[/content/dam/wknd/en/site2]))) AND a.[jcr:created] > CAST('2023-01-29T21:30:00.000Z' AS DATE) AND a.[jcr:created] < CAST('2023-01-30T21:30:00.000Z' AS DATE)
Hi @P_V_Nair
You can increase the node traversal limit from below configuration and give it a try.
Apache Jackrabbit Query Engine Settings Service
Hope it helps!
Thanks,
Gaurav
Views
Replies
Total Likes