laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.54k stars 327 forks source link

Typesense\Exceptions\ObjectNotFound #842

Closed mu-hasan closed 2 months ago

mu-hasan commented 2 months ago

Scout Version

10.10.0

Scout Driver

Typesense

Laravel Version

9.52.16

PHP Version

8.1.27

Database Driver & Version

No response

SDK Version

No response

Meilisearch CLI Version

No response

Description

I want to migrate from Algolia to TypeSense. When I want to import, it always got Typesense\Exceptions\ObjectNotFound. I try to log the TypeSense Client file on Typesense\ApiCall, I see the flow is like this:

[2024-06-26 13:15:53] local.DEBUG: method: get
endpoint: /collections/merchant_products
asJson: 1  
[2024-06-26 13:15:53] local.DEBUG: method: post
endpoint: /collections
asJson: 1  
[2024-06-26 13:15:53] local.DEBUG: method: delete
endpoint: /collections/merchant_products
asJson: 1  
[2024-06-26 13:15:53] local.DEBUG: method: post
endpoint: /collections/merchant_products/documents/import
asJson:   
[2024-06-26 13:15:53] local.ERROR: Not Found {"exception":"[object] (Typesense\\Exceptions\\ObjectNotFound(code: 0):
...

I think the flow is not right: get collection => create collection => delete collection => import document

Steps To Reproduce

php artisan scout:import "App\Models\MerchantProduct"

mu-hasan commented 2 months ago

Sorry, it's conflicted with package algolia/scout-extended: ^3.0