DivanteLtd / coreshop-vsbridge

CoreShop Vue Storefront integration - first Progressive Web App (PWA) framework for Pimcore
https://vuestorefront.io
MIT License
74 stars 25 forks source link

Elasticsearch 7 support #53

Closed dkarlovi closed 3 years ago

dkarlovi commented 3 years ago

Closes #30.

It works like this in my case:

ongr_elasticsearch:
    # TODO: make the bridge redefine this internally, so no ONGR Elasticsearch config would be required at all
    source_directories:
        - /src
        - /vendor/divante-ltd/coreshop-vsbridge/src/CoreShop2VueStorefrontBundle/Document

core_shop2_vue_storefront:
    repositories:
        attribute:
            id: app.repository.Attribute
        cms_block:
            id: app.repository.CmsBlock
        cms_page:
            id: app.repository.CmsPage
        cms_category:
            id: app.repository.CmsCategory
    elasticsearch:
        hosts: "%env(STOREFRONT_ELASTCSEARCH_DSN)%"
        index: "%env(STOREFRONT_ELASTCSEARCH_INDEX)%_{store}_{language}_{type}"
        templates:
            AppBundle\VueStorefront\Document\Product:
                mappings:
                    dynamic_templates:
                        - attribute_values:
                              match_mapping_type: string
                              match_pattern: regex
                              match: '^(TF|EF|TEF)I?[0-9]+$'
                              mapping:
                                  type: keyword
    stores:
        example.nl:
            languages:
                - nl
        example.co.uk:
            languages:
                - en
        example.com:
            languages:
                - en
                - nl

It works for attributes, categories, products, my custom repositores shown here (mapping to CMS blocks, pages).

dkarlovi commented 3 years ago

This works for me as-is. Not quite, some issues came up when testing against VSF 1.12.

dkarlovi commented 3 years ago

Now it works with VSF 1.12.