Should special fields (search_api_*) be filterable/sortable attributes?

Created on 13 September 2023, over 1 year ago

Problem/Motivation

Noticed that the search_api_* special required fields that were added in 📌 Remove entity id mapping config Fixed are also being set as sortable and filterable attributes. Since these are meant for functionality purposes I don't see the need for them to be set as filterable/sortable attributes.

Proposed resolution

  • Modify generateSortableAttributes function to exclude fields prefixed with "search_api_".
  • Move $indexAttributes = array_keys($index->getFields(TRUE)); to a method and also exclude fields prefixed with "search_api_". $filterableAttributes = $index->getFields(TRUE); should also exclude prefixed fields.
📌 Task
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024