Closed webdevfarhan closed 4 years ago
I am also getting this error on VSF client : https://controlc.com/0f74746f
[search] Can not connect the vue - storefront - api / ElasticSearch instance!Error: { "root_cause": [{ "type": "illegal_argument_exception", "reason": "request [/vue_storefront_catalog/product/_search] contains unrecognized parameter: [request] -> did you mean [request_cache]?" }], "type": "illegal_argument_exception", "reason": "request [/vue_storefront_catalog/product/_search] contains unrecognized parameter: [request] -> did you mean [request_cache]?" } at SearchAdapter.exports.modules.. / core / lib / search / adapter / api / searchAdapter.ts.SearchAdapter.handleResult(vsf - search - adapter - 0. server - bundle.js: 552: 23) at Object.resultPorcessor(vsf - search - adapter - 0. server - bundle.js: 578: 30) at server - bundle.js: 2083: 80 at process._tickCallback(internal / process / next_tick.js: 68: 7) Error during render: / Error: { "root_cause": [{ "type": "illegal_argument_exception", "reason": "request [/vue_storefront_catalog/product/_search] contains unrecognized parameter: [request] -> did you mean [request_cache]?" }], "type": "illegal_argument_exception", "reason": "request [/vue_storefront_catalog/product/_search] contains unrecognized parameter: [request] -> did you mean [request_cache]?" } at _commonErrorHandler(core / server - entry.ts: 18: 11) at server - bundle.js: 13484: 41 at process._tickCallback(internal / process / next_tick.js: 68: 7)
Because i was using docker so other services were having trouble connecting to elastic search so i used a common local ip (https://stackoverflow.com/a/18646069/8858217) that is available to all docker containers and my problem was solved.
I imported all products and categories with these commands :
./docker-bin/spree2vs.sh node ./dist/index.js products
./docker-bin/spree2vs.sh node ./dist/index.js categories
Then i checked VSF at localhost:3000 but no products were there although all products, categories and attributes were there in elasticsearch database. So i ran this command after reading some documentation :
yarn db rebuild
inside vsf-api folder.Then i am getting this error :
Please tell me if am doing something wrong or what is the problem ? I have imported all the products, categories and attributes inside elastic search database but they are not getting fetched in VueStoreFront, what can be the problem ?