Hello,
How we can create Smart collections programmatically?
If you can provide a code snippet, that would be helpful.
Thanks.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @iamnjain
You can use the OmniSearchService API to create smart collections programmatically. Here is the API documentation - https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/omn...
Hope this helps.
Thanks
Narendra
@iamnjain 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
@kautuk_sahniIf anyone can provide a working code snippet, that would be helpful.
Views
Replies
Total Likes
@iamnjain Actually instead of recreating the servlet, you can just make POST request to the existing servlet which is being used -
Servlet Path - http://localhost:4502/libs/granite/omnisearch/savedsearch
You can get the request parameters and header details by manually creating a collection in your AEM instance and then search for 'savedSearch' in network tab of Chrome Developer tools.
Can you also provide details on how you are planning to invoke the smart collections creation ?
Thanks
Narendra
Views
Likes
Replies
Views
Likes
Replies