divante/magento2-vsbridge-indexer
最新稳定版本:2.0.1
Composer 安装命令:
composer require divante/magento2-vsbridge-indexer
包简介
无描述信息
README 文档
README
Divante AlokaiIndexer Extension for Magento2
Stay connected
This projects is a native, Magento2 data indexer for Alokai - first Progressive Web App for e-Commerce. It fills the ElasticSearch data index with all the products, categories and static information required by Alokai to work.
Note on mage2alokai project: This native indexer updates the ElasticSearch index in the very same format like the mage2alokai. Our intention was to speed up the indexation process and make it more reliable. With native indexer we were able to use the Magento2 ORM and events to optimize the indexation process. Please do use this module instead of mage2alokai if You experience any issues regarding indexing performance. Both projects are currently supported.
Alokai is a standalone PWA storefront for your eCommerce, possible to connect with any eCommerce backend (eg. Magento, Pimcore, Prestashop or Shopware) through the API.
Video demo
Sign up for a demo at https://vuestorefront.io/ (Alokai integrated with Pimcore OR Magento2).
Overview
Version 1.5.0/1.5.1 - support for aliases.
Command php bin/magento vsbridge:reindex --all will reindex all data to new index.
It will create new index and update aliases at the end.
If you used previous versions, you will have to delete index (created with this extension) from ES manually:
If you won't do that, you will get error when running
"error":{"root_cause":[{"type":"invalid_alias_name_exception","reason":"Invalid alias name [vue_storefront_magento_1], an index exists with the same name as the alias"
Installation/Getting Started
- Install with composer
composer require divante/magento2-vsbridge-indexer
php bin/magento setup:upgrade
Installation/Getting Started - MSI support
- Install second module which will support MSI
composer require divante/magento2-vsbridge-indexer-msi
Not fully supported, few fields are exported to ES. From inventory indexer: -- qty => qty, -- is_salable => is_in_stock/stock_status
Example
Website 1
{
"sku": "24-MB01",
"stock": {
"qty": 100,
"is_in_stock": false,
"stock_status": 0
}
}
Website 2
{
"sku": "24-MB01",
"stock": {
"qty": 73,
"is_in_stock": true,
"stock_status": 1
}
}
php bin/magento setup:upgrade
Magento Configuration
Configure the module in Magento panel and run full indexation.
Check configuration here
Update Alokai/Alokai-API configuration
Important: It is crucial to update configuration elasticsearch.index in the Alokai and elasticsearch.indices in Alokai-API
Index Alias Prefix → define prefixes for ElasticSearch indexes. The panel allows adding prefix only to the catalog name e.g.: vue_storefront_catalog. For each store (store view) index name is generated on the base of defined prefix and either ID or Store Code. Aliases cannot be created.
Example: When we define following indexes: vue_storefront_catalog_1, vue_storefront_catalog_2, "vue_storefront_catalog_3".
Index Identifier → defines the unique store identifier to append to the ElasticSearch indexes. The default value is ID which will append the Store ID to the index name e.g.: vue_storefront_catalog_1. You can choose to change this to Store Code which will add the Store Code to the index name e.g.: vue_storefront_catalog_storecode.
Example with Store ID
Alokai config (base on default index prefix name: vue_storefront_magento)
"vue_storefront_magento_1" - index for store view with id 1
"elasticsearch": { "httpAuth": "", "host": "localhost:8080/api/catalog", "index": "vue_storefront_magento_1" }
Alokai-API config
"elasticsearch": { "host": "localhost", "port": 9200, "user": "elastic", "password": "changeme", "indices": [ "vue_storefront_magento_1" ],
Example with Store Code
Alokai config (base on default index prefix name: vue_storefront_magento)
"vue_storefront_magento_en_us" - index for store view with code "en_us"
"elasticsearch": { "httpAuth": "", "host": "localhost:8080/api/catalog", "index": "vue_storefront_magento_en_us" }
Alokai-API config
"elasticsearch": { "host": "localhost", "port": 9200, "user": "elastic", "password": "changeme", "indices": [ "vue_storefront_magento_en_us" ], }
Running the full indexation:
There are two options to run full indexations
- Indexation of new indexes.
In general, this indexation can be run in any order. It is worth, to begin with taxrule as it is the fastest.
php bin/magento indexer:reindex vsbridge_taxrule_indexer php bin/magento indexer:reindex vsbridge_attribute_indexer php bin/magento indexer:reindex vsbridge_product_indexer php bin/magento indexer:reindex vsbridge_category_indexer php bin/magento indexer:reindex vsbridge_cms_block_indexer php bin/magento indexer:reindex vsbridge_cms_page_indexer php bin/magento indexer:reindex vsbridge_review_indexer
- Reindexation of all indexes
Recommended for smaller databases. In the case of big databases it is better to run commands manually.
php bin/magento indexer:reindex
or
php bin/magento vsbridge:reindex --store=[STORE ID|STORE CODE] php bin/magento vsbridge:reindex --store=1
Note: If a docker with ElasticSearch is disabled, Indexer will display error: "No alive nodes found in your cluster".
Single Entity Indexing:
You can use single entity indexing while debugging or triggering an update for the index for a single entity.
php bin/magento vsbridge:index <index> <storeId> <entityId>
You must provide an index-name, a store ID and an entity ID.
If you need a list off all available index-names, you can use php bin/magento indexer:status. All the relevant indexes are prefixed with vsbridge_
Update on Save Mode
Update on Save mode works for the following operations:
- save/delete the product
- save/delete the category
- save/delete the static block
- save/delete the static page
- save/delete the attribute (deleting the attribute causes displaying “invalid” status for vsbridge products indexer).
- save/delete the review
Update on Schedule Mode
Update on Schedule mode observes changes in corresponding tables, and probably will be more relevant in most cases. It is the default mode in any bigger stores.
Compatibility
-- Alokai >= 1.4.4 Module was tested on: -- Magento Community version 2.2.7. It should perform without any issues on Magento 2.2.* and above versions.
-- Magento Commerce version 2.3.0. The bridge indexer cannot be installed on lower versions of Magento Enterprise.
-- You can install module on Magento 2.3.* Commerce, but you still need ES 5.* to export data.
Module will work with library elasticsearch/elastichsearch (5.*, 6.*)
TODO
- add a limitation of the categories sent to ElasticSearch, by adding new configurations: send only categories visible in the menu, send only active categories @Agata
- add a new command allowing to enable/disable following indexes: CMS Block, CMS Page.
- add an option to exclude the default Magento indexes (which do not impact new indexes operations)
- split catalog module to smaller modules
- remove "vsbridge_product_category" all together and run partial update in ES in different way
divante/magento2-vsbridge-indexer 适用场景与选型建议
divante/magento2-vsbridge-indexer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 157.64k 次下载、GitHub Stars 达 68, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「magento」 「magento2」 「vuestorefront」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 divante/magento2-vsbridge-indexer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 divante/magento2-vsbridge-indexer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 divante/magento2-vsbridge-indexer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Russian Language Pack for Magento 2
DPD Magento2 Shipping extension
BitBag VueStorefront bridge for Sylius.
Support for pagebuilder for magento2-vsbridge-indexer
Auto generate related products for Magento 2
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
统计信息
- 总下载量: 157.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 68
- 点击次数: 26
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 未知