Back in #2983606: Provide an excerpt field to use in view modes., we added an Excerpt field that could be used in view modes when rendering search results.
However, the way it was implemented requires each caller of $datasource->viewItem() to manually set $build['#search_api_excerpt'] on the returned array in order for it to work, and we forgot the Views “Rendered item” field.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3164255-2--excerpt_for_views_rendered_item_field.patch | 2.16 KB | drunken monkey |
Comments
Comment #2
drunken monkeyThis should do it.
Comment #3
borisson_Are we sure this is related?
Comment #4
drunken monkeyIt isn’t, sorry, just couldn’t help myself once again.
Does it otherwise look good to you?
Comment #5
borisson_Otherwise this looks great, +1
Comment #6
drunken monkeyGood to hear, thanks for reviewing!
Committed.
Comment #9
ericdsd commentedHi
i couldn't get the excerpt rendered in Rendered item field, i had to switch my view render from field to rendered entity to get the exerpt available on 8.x-1.18.
Note that i've only tested it on media entities.