Unable to apply data patch Magento\CatalogSearch\Setup\Patch\Data\SetInitialSearchWeightForAttributes for module Magento_CatalogSearch. Original exception message: Indexer handler is not available: elasticsearch6

What is the best way to get either around this or fix this?

Note: I cannot get into my admin, I cannot run the setup: upgrade command as the message above halts the upgrade process. I have access to the config files and the database.

Version: Magento EE 2.3.3

  • You can try switch to mysql and in time find solution for your error Just run php -f bin/magento config:set catalog/search/engine 'mysql'. And reindex now and setup:upgrade
    – BartZalas
    Nov 12, 2019 at 21:28
  • I went to my config.php and switched the search engine from elasticsearch to mysql. No luck as when I try to s:up I still get the same error, and this: bin/magento app:config:import Processing configurations data from configuration file... Import failed: The store that was requested wasn't found. Verify the store and try again. Nov 13, 2019 at 15:01
  • Try to disable thirds party modules to be sure that they not causing this.
    – BartZalas
    Nov 13, 2019 at 22:36

1 Answer 1


I was able to resolve this, on a Mac, with ElasticSearch installed through homebrew.

Before this error, I always saw the following errors in the var/log/system.log:

[2023-05-04T12:35:33.520048+00:00] report.ERROR: Sample Data error: {"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [acom246_product_1_v1] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"}],"type":"cluster_block_exception","reason":"index [acom246_product_1_v1] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"},"status":429} [] []

The disk usage exceeded flood-stage watermark error occurred when I still have 897 GB of available disk space. This resolved my issue:

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": "90%",
    "cluster.routing.allocation.disk.watermark.high": "95%",
    "cluster.routing.allocation.disk.watermark.flood_stage": "97%"
curl -X PUT "localhost:9200/*/_settings?expand_wildcards=all&pretty" -H 'Content-Type: application/json' -d'
  "index.blocks.read_only_allow_delete": null

Source: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/fix-common-cluster-issues.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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