Importing Data - Search Index Item Collection Columns Problem
onursonmez opened this issue · 2 comments
Describe the bug
I tried to import a product with the import feature in the src/import-from-other-platform.ts section at https://docs.vendure.io/guides/developer-guide/importing-data/, but the collectionIds and collectionSlugs columns in the search_index_item table are empty. I realized it was. If I manually enter data here, the product appears, but when it is empty, the product does not appear.
To Reproduce
Steps to reproduce the behavior:
- Go to https://docs.vendure.io/guides/developer-guide/importing-data/ and test src/import-from-other-platform.ts section.
- Although it belongs to a collection on the product detail page, you will see that the collectionIds and collectionSlugs sections in the search_index_item section of the database are empty.
Environment (please complete the following information):
- @vendure/core version: 2.2.6
- Nodejs version: v18.20.0
- Database (mysql/postgres etc): pg 16
-
The product has a collection and the collection facet adjustment has been made. If I manually write a category in the collectionIds and collectionSlugs sections of the search_index_item table, the product is displayed in the frontend.
Additional information: Even though I manually reindexed the product listing page, these columns are still empty, but if I go to collection and make an update, then it gets fixed.
I think the problem is due to the lack of imported variant data in the collection_product_variants_product_variant table. When you enter the imported product and perform any update, it inserts the variants into this table and the collectionIds and collectionSlugs columns in the search_index_item table are filled. The screenshot is attached.