Thursday, 1 August 2019

Magento 2.3.1 Notice: Undefined index: color_bucket / gift_dropdown_bucket / gift_price_bucket

This is not to be a problem in Magento, but in problem with Elastic-Search.

Magento 2.3.1 Notice: Undefined index: color_bucket / gift_dropdown_bucket / gift_price_bucket \/app\/vendor\/magento\/module-elasticsearch\/SearchAdapter\/Aggregation\/Builder\/Term.php$

Solved :

 Find the attribute gift_dropdown remove _bucket

Go To admin and Store >> Product then search attribute with code.

Use in Search: No

Use In Search Results Layered Navigation No 

Then run the following two commands:

php bin/magento cache:clean

php bin/magento indexer:reindex catalogsearch_fulltext 

if get this warning for another attribute after doing this change. repeat the same process with another attribute.