Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Hello,
How we can create Smart collections programmatically?
If you can provide a code snippet, that would be helpful.
Thanks.
Anhand von Themen werden Community-Inhalte kategorisiert und Sie können so relevanten Inhalt besser finden.
Zugriffe
Antworten
Likes gesamt
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
Can you please provide a code example as well?
This is new to me, so I am asking 🙂
@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.
Zugriffe
Antworten
Likes gesamt
@kautuk_sahniIf anyone can provide a working code snippet, that would be helpful.
@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
Zugriffe
Likes
Antworten