From 9553c2e7f91d9a6e5095f438d41e51723147b2de Mon Sep 17 00:00:00 2001 From: pushrbx Date: Mon, 28 Oct 2024 16:22:48 +0100 Subject: [PATCH] fixed search index collection schema for producers --- app/Producers.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/app/Producers.php b/app/Producers.php index f46216d..dd5441c 100644 --- a/app/Producers.php +++ b/app/Producers.php @@ -72,6 +72,33 @@ class Producers extends JikanApiSearchableModel ]; } + public function getCollectionSchema(): array + { + return [ + 'name' => $this->searchableAs(), + 'fields' => [ + [ + 'name' => '.*', + 'type' => 'auto', + ], + [ + 'name' => 'titles', + 'type' => 'string', + 'optional' => false, + 'infix' => true, + 'sort' => true + ], + [ + 'name' => 'url', + 'type' => 'string', + 'optional' => false, + 'infix' => true, + 'sort' => true + ], + ] + ]; + } + public function typesenseQueryBy(): array { return [