Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
viv-design opened this issue Jan 25, 2022 · 3 comments
Labels
good first issue Good for newcomers

Comments

@viv-design
Copy link

Here you should add the scout metadata to the toSearchableArray output

$this->typesense->importDocuments($collection, $models->map(fn ($m) => $m->toSearchableArray())
->toArray());

@AbdullahFaqeir
Copy link
Collaborator

@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 AbdullahFaqeir self-assigned this Apr 19, 2022
@AbdullahFaqeir AbdullahFaqeir added the good first issue Good for newcomers label Apr 19, 2022
@arayiksmbatyan
Copy link
Contributor

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

@karakhanyans
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants