Problem

I have some Display Suite token fields, and I want to include these and other entity fields in the Search API search results.

I also want to include the Search API Excerpt field in the results.

What's the easiest way to get these DS fields into the search results along with other entity fields?

What I've tried

I have tried using Fields for the view's Format > Show setting, but the DS fields don't appear as field options.

I have tried using Rendered entity for the view's Format > Show setting, but the Excerpt field doesn't appear as a field option in any of the display configurations.

I have tried adding custom theme templates to override the display, and I get a fatal error. I haven't resolved this error after a bit of searching, so theme overrides doesn't look like the easiest route.

When a #lazy_builder callback is specified, no properties can exist; all properties must be generated by the #lazy_builder callback. You specified the following properties: #attributes.
有帮助吗?

解决方案

I missed it earlier, but it turns out that Search API just exposed the Excerpt field to view modes.

Updating Search API to 8.x-1.x-dev and a cache rebuild gave me the functionality I need.

许可以下: CC-BY-SA归因
scroll top