Error when indexing special fields (search_api_*)

Created on 23 October 2023, about 1 year ago
Updated 8 February 2024, 9 months ago

Problem/Motivation

Since we added the special fields search_api_language, search_api_datasource, and search_api_id. A new error pops up in the logs (in this example I'm only giving it for the language field, but it happens with all three):

Drupal\search_api\SearchApiException while adding Views handlers for field on index Content index: Field 'search_api_language' on index 'Content index' has no property path set. in Drupal\search_api\Item\Field->getDataDefinition() (line 479 of /var/www/html/web/modules/custom/search_api/src/Item/Field.php).

When fixing some Search API module issues, I mentioned that this module indexes special fields, and the maintainer said:

I donโ€™t think itโ€™s smart to include those special fields there, since it might confuse users.

Here's the issue if someone wants to check it out ๐Ÿ› PHP 8.1 Deprecated Function Needs work .

Steps to reproduce

  1. Install Search API module & Search API Meilisearch module.
  2. Add Meilisearch server and add an index for any content.
  3. Index the data
  4. There should be three errors in the dblogs related to the special fields

Proposed resolution

At the moment I have no idea how this would be fixed since we require at least two of those three fields for the module to work. I've asked the maintainer if it's okay to index these fields and if we are doing it incorrectly. Waiting for the reply.

๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024