laravel-scout-typesense-driver
laravel-scout-typesense-driver copied to clipboard
Scout metadata not added to the collection and scout.soft_delete setting is ignored
Here you should add the scout metadata to the toSearchableArray output https://github.com/typesense/laravel-scout-typesense-driver/blob/cf1c1de3f9db29826890bde580c7713655ee4aef/src/Engines/TypesenseEngine.php#L86-L87
@viv-design As typesense collection schema isn't usually dynamically defined, this would cause an issue when trying to index documents with "field not found" or something like that, I'll try to implement a solution for this issue ASAP.
Hi @viv-design. When you create a collection schema, do your imports, and then modify the collection schema, you have do remove the collection and apply the changes in the schema, after that create collection (example: $client->collections->create((new \App\Models\Todo)->getCollectionSchema())), and you need add your meta keys in typesenseQueryBy
and set value in toSearchableArray
method. After all changes run php artisan scout:import
Hi @viv-design is there any other things we can do for you for this issue?