'Laravel. Meilisearch sorting by jsonb attribute

I am implementing sorting and filtering on my Eloquent models via Meilisearch. Everything is fine, but sorting by an attribute whose type is 'jsonb' does not work.

GlossaryItem::search($query, function ($meilisearch, $query, $options) use ($request) {
    /**
     * Here the name is of type jsonb (because the model are translatable):
     * "name": {
     *      "ru": "some value",
     *      "en": "some value",
     *      "zh": "some value",
     * }
     */
    return $meilisearch->search($query, ['sort' => ['name:asc']]);
})->paginate(15);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source