cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.1 Notice: Undefined index: color_bucket

SOLVED

Magento 2.3.1 Notice: Undefined index: color_bucket

Best,

I have an issue on category pages which i am unable to resolve myself.

If i visit a category i am getting the following error:

here has been an error processing your request

Notice: Undefined index: color_bucket in /home/my_username/public_html/vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder/Term.php on line 26

Error log record number: 1142780784558

 

Exceprion.log

 

[2019-04-09 09:56:28] main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [myparcel_digital_stamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v118","node":"yZ0CG1SRQkKA47PfAVou5A","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [myparcel_digital_stamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [myparcel_digital_stamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v118\",\"node\":\"yZ0CG1SRQkKA47PfAVou5A\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [myparcel_digital_stamp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\"}}]},\"status\":400} at /home/my_username/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:615)"} []

 

I have no clue how to reproduce this problem.

I have done all solutions I could find included the solution wit the manufacturer attribute.

 

I am stuck

 

Who can point me out how to reproduce this error.

Which files are involved and Where?

What code to change?

Is this resolvable in the database?

 

Best regards

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.3.1 Notice: Undefined index: color_bucket

I ran into the same exact issue on 2.3.1. This link helped me solve the issue:

https://magento.stackexchange.com/questions/256157/magento-2-3-elastic-search-5-0-error-on-some-page...

 

Under Stores -> Attributes -> Product select Color. Then go to store front properties tab and set the following:

Use in Search: No

Use In Search Results Layered Navigation No

 

Then run the following two commands:

bin/magento cache:clean

bin/magento indexer:reindex catalogsearch_fulltext

 

You may get this warning for another attribute after doing this change. The key for this is a filterable attributes could be only Boolean, price and select and multiselect.

View solution in original post

3 REPLIES 3

Re: Magento 2.3.1 Notice: Undefined index: color_bucket

I ran into the same exact issue on 2.3.1. This link helped me solve the issue:

https://magento.stackexchange.com/questions/256157/magento-2-3-elastic-search-5-0-error-on-some-page...

 

Under Stores -> Attributes -> Product select Color. Then go to store front properties tab and set the following:

Use in Search: No

Use In Search Results Layered Navigation No

 

Then run the following two commands:

bin/magento cache:clean

bin/magento indexer:reindex catalogsearch_fulltext

 

You may get this warning for another attribute after doing this change. The key for this is a filterable attributes could be only Boolean, price and select and multiselect.

Re: Magento 2.3.1 Notice: Undefined index: color_bucket

Best,

 

you are absolutely  right.

And I found out it was the MyParcel extension.

 

Problem solved!

In the attribute myparcel_digital_stamp Set the Use in Layered Navigation To No.

 

Thank you for your reply.

 

Best regards, Boompie

 

 

Re: Magento 2.3.1 Notice: Undefined index: color_bucket

Hi All,

 

I can able to reproduce the issue.

The issue causes because of elasticSearch services got stopped / disabled.

If we start those services again everything works fine.

But Need to find some other solution as well, even if elasticSearch got stopped the site wont break with this errors.

 

Thanks & Regards,

G Lokesh