Hide non-matching snippet fields

Created on 27 April 2021, over 3 years ago
Updated 30 September 2024, about 2 months ago

Problem/Motivation

The '_snippetResult' array returned in an Algolia response is currently being used to generate a search_api Item's excerpt - however, some fields in the snippet result array may have a 'matchLevel' key set to 'none', which means we shouldn't include that field in the snippet.

Proposed resolution

Attached patch filters the snippet result array to exclude fields with matchLevel = none.

Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024