searchableattributes can not be used as attribute ranking order

Created on 4 June 2024, 24 days ago
Updated 21 June 2024, 8 days ago

Problem/Motivation

The order of results (in Meilisearch Mini Dashboard as well) did not seem to follow relevance rules. And here's why:

We sort the fields by the boost settings in \Drupal\search_api_meilisearch\Plugin\search_api\backend\SearchApiMeilisearchBackend::generateSearchableAttributes.

In \Drupal\search_api_meilisearch\Plugin\search_api\backend\SearchApiMeilisearchBackend::updateIndex we compare the list from server, when different we update the list on the server.

But because we use php function sort, we reset the sort via boost settings in\Drupal\search_api_meilisearch\Plugin\search_api\backend\SearchApiMeilisearchBackend::generateSearchableAttributes. Therefore list can not be used as ranking order.

Proposed resolution

Remove sort, so that generated list is send to server.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany tobiasb Berlin

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024