typesense / laravel-scout-typesense-driver

Laravel Scout Driver for Typesense
https://typesense.org
MIT License
131 stars 38 forks source link

Error importing document: Field `itemStocks` not found. #68

Open Rasimoghlu opened 1 year ago

Rasimoghlu commented 1 year ago

if ($this->itemStocks->isNotEmpty()) { $extraFields['itemStocks'] = $this->itemStocks->map(function ($itemStock) { return [ 'available' => (int)$itemStock->available, 'stock_unit_code' => (string)$itemStock->stock_unit_code, 'source_warehouse_id' => (int)$itemStock->source_warehouse_id ]; })->toArray(); }

When im trying to import object like this i get error Error importing document: Field itemStocks not found.

How to fix it? I declared itemStocks in schema and gived type object[]

karakhanyans commented 1 year ago

Hi @Rasimoghlu

Thanks for reporting this issue, we will prioritise it and solve.

karakhanyans commented 1 year ago

@Rasimoghlu we are working on this bug you reported: https://stackoverflow.com/questions/76198963/how-to-filter-in-typesensne-collection-of-objects-in-laravel

Could you please share with us your getCollectionSchema and the version of the package that you are using?