Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adobe Search & Promote - Did you mean feature

Avatar

Level 4

I am trying to implement "Guided Suggestions" feature in Search & Promote. I have added below code in presentation template. But I don't see any suggestions in S&P response. Any pointers would be helpful.

 

Code added in Presentation Template:

 <suggestions>
<auto-searched><guided-if-suggestion-autosearch>1<guided-else-suggestion-autosearch>0</guided-if-suggestion-autosearch></auto-searched>
<guided-if-suggestion-autosearch><orig-query><![CDATA[<guided-suggestion-original-query/>]]></orig-query></guided-if-suggestion-autosearch>
<suggestions-low-results><guided-if-suggestion-low-results>1<guided-else-suggestion-low-results>0</guided-if-suggestion-low-results></suggestions-low-results>
<guided-suggestions>
<suggestion-item>
<link><![CDATA[<guided-suggestion-path />]]></link>
<word><![CDATA[<guided-suggestion />]]></word>
</suggestion-item>
</guided-suggestions>
</suggestions>

 

S&P response:

<suggestions>
<auto-searched>0</auto-searched>
<suggestions-low-results>0</suggestions-low-results>
</suggestions>
1 Accepted Solution

Avatar

Community Advisor

Are you trying the partial search (part of the string)? If yes, you'll have to define a dictionary. Also, there are different mechanisms to search on the backend.

 

You can also use <guided-if-suggestions> and guided tags on the presentation template.

3 Replies

Avatar

Level 1

Please check Transport template as well. It should have something like below.

 

<search-if-suggestions>
<suggestions>
<search-suggestions>
<suggestion><search-suggestion-text /></suggestion>
</search-suggestions>
</suggestions>
</search-if-suggestions>

 

Your presentation template looks fine to me. However just trying to add what is working for me.

 


<suggestions>
<auto-searched><guided-if-suggestion-autosearch>1<guided-else-suggestion-autosearch>0</guided-if-suggestion-autosearch></auto-searched>
<guided-if-suggestion-autosearch><orig-query><![CDATA[<guided-suggestion-original-query/>]]></orig-query></guided-if-suggestion-autosearch>
<suggestions-low-results><guided-if-suggestion-low-results>1<guided-else-suggestion-low-results>0</guided-if-suggestion-low-results></suggestions-low-results>
<guided-suggestions>
<suggestion-item>
<link><![CDATA[<guided-suggestion-path />]]></link>
<word><![CDATA[<guided-suggestion />]]></word>
</suggestion-item>
</guided-suggestions>
</suggestions>

Avatar

Level 4
I already have it in transport template too but no luck. I have tried the snippet which you shared even, but it didn't work. guided.tmpl <search-if-suggestions> <suggestions> <search-suggestions> <suggestion> <value><search-suggestion-text /></value> <count><search-suggestion-result-count /></count> </suggestion> </search-suggestions> </suggestions> </search-if-suggestions> json.tmpl <search-if-suggestions> "suggestions": [ <search-suggestions> { "suggestion":"<search-suggestion-text />", "count": "<search-suggestion-result-count>" }<search-if-not-last-suggestion>,</search-if-not-last-suggestion> </search-suggestions> ], </search-if-suggestions>

Avatar

Community Advisor

Are you trying the partial search (part of the string)? If yes, you'll have to define a dictionary. Also, there are different mechanisms to search on the backend.

 

You can also use <guided-if-suggestions> and guided tags on the presentation template.