I want to get the asset nodes for the given expiry dates for ACS commons report generation. The OOTB index "/oak:index/damAssetLucene" is picked by default by i am getting an error that query need to traverse more than 180000 nodes. So i created a custom index but still AEM is picking up the OOTB index only.
Pls let me know where i am making mistake.
Sample Query:
SELECT * FROM [dam:Asset] AS NODE WHERE ISDESCENDANTNODE ('/content/dam') AND NODE.[/jcr:content/metadata/prism:expirationDate] >= cast('2023-03-15T00:00:00.000+05:30' as date) AND NODE.[/jcr:content/metadata/prism:expirationDate] <= cast('2023-06-15T00:00:00.000+05:30' as date)
Index Node Created:
Solved! Go to Solution.
Views
Replies
Total Likes
Non root indexes - If your query always perform search under certain paths then create index definition under those paths only. This might be helpful in multi tenant deployment where each tenant data is stored under specific repository path and all queries are made under those path.
In fact, it's recommended to use single index if all the properties being indexed are related. This would enable Lucene index to evaluate as much property restriction as possible natively (which is faster) and also save on storage cost incurred in storing the node path.
@navneet_77 Could you move the index definition under /content/dam and reindex it and test it out and see if the AEM is picking it?
If your queries are only being run under certain paths, then create those indexes under those paths. Indexes are not required to live at the root of the repository.
Try the query with explain query tool and see the response on why its picking and the cost associated.
https://adobe-consulting-services.github.io/acs-aem-tools/features/explain-query/index.html
Hi Saravan,
Thanks for your suggestion, but still i am facing same issue. Please let me know if there are any other directions/sugeestions which i can try out.
Thanks.
@navneet_77 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Non root indexes - If your query always perform search under certain paths then create index definition under those paths only. This might be helpful in multi tenant deployment where each tenant data is stored under specific repository path and all queries are made under those path.
In fact, it's recommended to use single index if all the properties being indexed are related. This would enable Lucene index to evaluate as much property restriction as possible natively (which is faster) and also save on storage cost incurred in storing the node path.
Hi,
is it possible to have non root indexes on AEMaaCS too?
On the official website, e.g. [1], I only found examples regarding indexes put under /oak:index and warnings telling not to use more than one index per node type.
Filippo
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies