How to show "short_description" attribute instead of "description" in instantsearch?

Hello,

I just wondering how to show the short_description instead of description. Here is what is called in hit-item.phtml on line 32:

<div class="result-description text-ellipsis">{{{ _highlightResult.description.value }}}</div>

I tried to change it to:

<div class="result-description text-ellipsis">{{{ _highlightResult.short_description.value }}}</div>

But no effect. Can you help me out?

Thanks

A requirement for an attribute to be highlighted is to be set as searchableAttribute.
Is the short_description attribute set as searchableAttribute?

I am using magento 1 extension. And as I check in the settings it is set as searchable, is that what you mean?

Hi @nino.riconalla,

To take one step back from the _highlightResult.short_description.value, can you change this to just to see if the attribute displays in your results:

<div class="result-description text-ellipsis">{{{ short_description.value }}}</div>

Oh sorry my bad. It works when I run index manually. So <div class="result-description text-ellipsis">{{{ _highlightResult.short_description.value }}}</div> does work.

Thank you guys for help. :peace_symbol:

1 Like