Highlighted

Adobe Search & Promote - Did you mean feature

kishore_polsani

11-05-2020

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>
Adobe Search & Promote Did you mean Guided Search

Replies

Highlighted

murthyk55735255

11-05-2020

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>

Highlighted

kishore_polsani

12-05-2020

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>
Highlighted

Singaiah_Chintalapudi

MVP

12-05-2020

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.