We're using the search API something like this, and returning results in alphabetical order:
// Set up $search_api_index = $this->entityTypeManager->getStorage('search_api_index'); $index = $search_api_index->load($name); $search_id = 'restful_search_' . uniqid(); $query = $index->query([ 'limit' => $limit, 'offset' => $offset, 'search id' => $search_id ]); // Add some conditions $query->addConditionGroup($conditionGroup); // Add sort directive $query->sort('title', SORT_ASC);
This is working, and the results are coming back in alphabetical order. However, we'd like the sort according to the Finnish/Swedish alphabet.
So instead of things being sorted like "ÄBC", we'd like them sorted like "BCÄ". That is, those beginning with Å, Ä and Ö etc. should come last, not first.
Is it possible to tell the Search API to return results which meet this order?