laravel-scout-typesense-driver icon indicating copy to clipboard operation
laravel-scout-typesense-driver copied to clipboard

Scout metadata not added to the collection and scout.soft_delete setting is ignored

Open viv-design opened this issue 3 years ago • 3 comments

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 avatar Jan 25 '22 16:01 viv-design

@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.

AbdullahFaqeir avatar Apr 19 '22 21:04 AbdullahFaqeir

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

arayiksmbatyan avatar Jun 05 '23 08:06 arayiksmbatyan

Hi @viv-design is there any other things we can do for you for this issue?

karakhanyans avatar Jun 16 '23 06:06 karakhanyans