When I do a simple search on my site, I am searching across three channels. One of them is an image gallery set up using Matrix. In the Matrix field for that channel there is a column called "img_caption", which is, obviously, a caption for the image.
In my search results, I try to trap which channel a search result row is coming from and display the appropriate field (as the "excerpt") using conditionals, like this:
{if summary!=""}{exp:ce_str:ing remove_html truncate="150"}{summary}{/exp:ce_str:ing}{/if}
{if rick_summary!=""}{exp:ce_str:ing remove_html truncate="150"}{rick_summary}{/exp:ce_str:ing}{/if}
{if img_caption!=""}{exp:ce_str:ing remove_html truncate="150"}{img_caption}{/exp:ce_str:ing}{/if}
I do have "custom_field" set to "yes" in the search results tag:
{exp:search:search_results switch="resultRowOne|resultRowTwo" custom_fields="yes"}
This is working for {summary} and {rick_summary} but not for {img_caption}.
I've edited a few entries in the gallery and resaved them, thinking that might be the issue. And, the img_caption column as well as the matrix field is set to be searchable.
Search is finding results from the gallery, at least based on the entry title, so I am getting results, just nothing I can use as an excerpt.
Any ideas for me?