added typesense collection schema for Magazine model

This commit is contained in:
pushrbx 2024-11-08 19:36:45 +00:00 committed by GitHub
parent 9553c2e7f9
commit 2272ed17c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,6 +72,33 @@ class Magazine 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 public function typesenseQueryBy(): array
{ {
return [ return [