1

I'm trying to set up docker for magento 2.3.0 and elasticsearch 6.4.2

After containers are up i can connect to elasticsearch through browser and set up connection in magento 2 admin panel with message "Success".

Than i cleared cache and try to reindex catalogsearch_fulltext index. I recieved an error message:

Catalog Search indexer process unknown error:
{
    "error": {
        "root_cause": [{
            "type": "illegal_argument_exception",
            "reason": "Enabling [_all] is disabled in 6.0. As a replacement, you can use [copy_to] on mapping fields to create your own catch all field."
        }],
        "type": "illegal_argument_exception",
        "reason": "Enabling [_all] is disabled in 6.0. As a replacement, you can use [copy_to] on mapping fields to create your own catch all field."
    },
    "status": 400
}

It's been throw out in

vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php line 272

The same on elasticsearch 7.0.0

Does anyone has this problem? Can i somehow fixed it?

  • hey why do we need below "psr-4": { "Magento\\Elasticsearch\\": "" } – Vishal Aug 17 '19 at 18:13
4

If you are using Magento 2.3.0 you have to use elasticsearch 5.x. Refer to offical doc.

Composer of Magento 2.3.0

{
    "name": "magento/module-elasticsearch",
    "description": "N/A",
    "require": {
        "php": "~7.1.3||~7.2.0",
        "magento/module-advanced-search": "100.3.*",
        "magento/module-catalog": "103.0.*",
        "magento/module-catalog-search": "101.0.*",
        "magento/module-customer": "102.0.*",
        "magento/module-eav": "102.0.*",
        "magento/module-search": "101.0.*",
        "magento/module-store": "101.0.*",
        "magento/module-catalog-inventory": "100.3.*",
        "magento/framework": "102.0.*",
        "elasticsearch/elasticsearch": "~2.0|~5.1"
    },
    "suggest": {
        "magento/module-config": "101.1.*"
    },
    "type": "magento2-module",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Magento\\Elasticsearch\\": ""
        }
    },
    "version": "100.3.0"
}

If you want to use elasticsearch 6.x you need to upgrade your magento to v2.3.1.

Composer of Magento 2.3.1

{
    "name": "magento/module-elasticsearch",
    "description": "N/A",
    "require": {
        "php": "~7.1.3||~7.2.0",
        "magento/module-advanced-search": "100.3.*",
        "magento/module-catalog": "103.0.*",
        "magento/module-catalog-search": "101.0.*",
        "magento/module-customer": "102.0.*",
        "magento/module-eav": "102.0.*",
        "magento/module-search": "101.0.*",
        "magento/module-store": "101.0.*",
        "magento/module-catalog-inventory": "100.3.*",
        "magento/framework": "102.0.*",
        "elasticsearch/elasticsearch": "~2.0|~5.1|~6.1"
    },
    "suggest": {
        "magento/module-config": "101.1.*"
    },
    "type": "magento2-module",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Magento\\Elasticsearch\\": ""
        }
    },
    "version": "100.3.1"
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.