diff --git a/app/Producers.php b/app/Producers.php index f46216d8..dd5441c0 100644 --- a/app/Producers.php +++ b/app/Producers.php @@ -72,6 +72,33 @@ public function toSearchableArray(): array ]; } + 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 [