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

Error importing document: Field `itemStocks` not found.

Open Rasimoghlu opened this issue 1 year ago • 2 comments

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[]

Rasimoghlu avatar May 06 '23 00:05 Rasimoghlu

Hi @Rasimoghlu

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

karakhanyans avatar May 19 '23 06:05 karakhanyans

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

karakhanyans avatar May 19 '23 07:05 karakhanyans