Highlight title excerpt

Created on 15 August 2023, about 1 year ago
Updated 18 October 2023, 12 months ago

Problem/Motivation

When i'm using the view mode and creating a specific template for the search-results, I can only display the excerpt for the body field like that
{{ content.search_api_excerpt }} but it's not working for the title {{ label }}

Steps to reproduce

activate the highlight processor, then in the search_api_page activate the view mode, create the template and enable the Search result excerpt, and the for the title excerpt is not working

Proposed resolution

use twig filter to force the highliht?

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland sir_squall

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sir_squall
  • πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

    So, your problem is that the titles displayed in the search results are not highlighted? And you are using the Search API Pages module β†’ for creating the search page?
    Then your issue should be reported there, I don’t think it really has anything to do with this module, unless the highlighted field value is actually missing internally.

  • πŸ‡¨πŸ‡­Switzerland sir_squall

    Hello,

    Yes, you have perfectly summarized it. This module allows us to create a page, and then in the display mode of the content type, we have the option to include a "Search result excerpt."

    However, this approach may not be ideal. Perhaps we could have a more versatile solution, like a formatter that we can apply to any field, such as title, body, and so on. What are your thoughts on this?

    Thank you.

Production build 0.71.5 2024