Support for Elastic 7.x
See original GitHub issue-
I’m submitting a …
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
-
What is the current behavior?
Currently we’re storing multiple document types (product, attribute, categories, taxrules) in single index (vue_storefront_catalog by default). ES 6.x is no longer supporting this setup and requires us to have:
- single index per entity type (A)
- custom type field (B)
https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html
I believe that we should follow the A (looking forward to Your feedback!) using the following naming convention for indexes:
- vue_storefront_catalog_product
- vue_storefront_catalog_category
- …
We should avoid as many changes required on the users as we could.
-
Changes in the config The index name should be changed just before reaching the ES - ** without requiring the config changes** (eg. we have
vue_storefront_catalog
in the config so we can just add theentityType
toindexName
in here: https://github.com/DivanteLtd/vue-storefront-api/blob/e0aa58460f6a986e2527f364946fc751620d7428/src/api/catalog.js#L55) -
Automatic migration We can base on
apiVersion
( https://github.com/DivanteLtd/vue-storefront-api/blob/e0aa58460f6a986e2527f364946fc751620d7428/config/default.json#L33) and check - if there is the6.x
selected we should run the automatic migration invue-storefront-api
+ placing a lock file like.es.migrated
- to let the script know no further migration is required.
It can be a separate migration script or just another migration (then no lock file is required) -> https://github.com/DivanteLtd/vue-storefront-api/tree/master/migrations
- Front-end This change should be TRANSPARENT to the frontend VS - with no changes required (both config, and code)
To do so we must refactor:
- vue-storefront-api/src/scripts/db.js
- vue-storefront-api/migrations
- mage2vuestorefront
- vue-storefront/core/store/lib/search.js
- vue-storefront-api/package.js to modify the restore and migrate scripts
- docker files
- add migration scripts to reindex existing indexes to the new format
Later on:
- https://github.com/DivanteLtd/magento1-vsbridge-indexer
- https://github.com/DivanteLtd/magento2-vsbridge-indexer
- What is the expected behavior?
We should have the ES 6.x supported by default
- What is the motivation / use case for changing the behavior?
The main motivation is that we re bound to 5.x
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:9
Top GitHub Comments
Yes, it should more like: most recent stable Elastic version available 😃
https://github.com/DivanteLtd/vue-storefront-api/pull/342/files https://github.com/DivanteLtd/mage2vuestorefront/pull/96
We probably won’t gonna make it to Vue Storefront 1.11rc-1 - but we’ll try to include the Elastic 7 support in 1.11rc-2 as it’s pretty much required for the LTS