Hi Team,
As part of referenceSearch.search , we are passing resolver and path. but it is deprecated now. We have two more additional parameters, limit and offset. In this case, we want to know the number of assets to set the limit.
How to find the number of assets here?
Solved! Go to Solution.
Views
Replies
Total Likes
I could see ReferenceSearch api has below methods -
setMaxReferencesPerPage(int maxReferencesPerPage) to set the value of maxReferencesPerPage.
You could see below implementation how did they set the value of max references per pages -
http://experience-aem.blogspot.com/2015/07/aem-61-get-references-of-page-or-asset.html
But in query builder we can easily use offset and limit.
Please brief us about the actual requirement here.
Hi,
Did you try passing limit as -1 to return all the references?
Hi Ravi_Pampana,
You mean like this? referenceSearch.search(resourceResolver, assetPath, 0, -1)
if we pass like this, will it get all the assets?
I could see ReferenceSearch api has below methods -
setMaxReferencesPerPage(int maxReferencesPerPage) to set the value of maxReferencesPerPage.
You could see below implementation how did they set the value of max references per pages -
http://experience-aem.blogspot.com/2015/07/aem-61-get-references-of-page-or-asset.html
But in query builder we can easily use offset and limit.
Please brief us about the actual requirement here.
Views
Likes
Replies
Views
Likes
Replies