1

report.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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":"magento233_ela6_product_1_v6","node":"C3kR1cBBR0y_TcZ3EZQgmQ","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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 [category_ids] 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\":\"magento233_ela6_product_1_v6\",\"node\":\"C3kR1cBBR0y_TcZ3EZQgmQ\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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.\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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.\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] 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}

Facing this issue when we have Magento 2.3.3 and ES 6.x and PHP7.2

Magento given doc https://magento1544124303.zendesk.com/hc/en-us/articles/360031328652-illegal-argument-exception-on-category-page-with-Elasticsearch-5-0-Fielddata-is-disabled-on-text-fields-by-default- not even help here.

Anybody having idea how to resolve this issue?

  • Use latest ES version - elastic.co/guide/en/elasticsearch/reference/6.8/… .. It will solve the issue if you don't have 3rd party modules otherwise 3rd party modules also requires upgrade. – MageSoftech Jan 7 at 16:32
  • But Magento 2.3 support 6.5.x only right? Will it support 6.8? – seeni Jan 7 at 17:36
  • We have tried that too. Still same issue. – seeni Jan 7 at 17:44
  • is category_ids a custom attribute created by you or a module? – paj Jan 7 at 18:36
  • I had something like this when i upgraded. There was an error in my code and the Indexing within Magento wasn't completing. More info would be helpful. Have you written your own module? Did it work before on a previous Magento/Elastic version? – Anthony Jan 8 at 1:58
0

we fixed this issue by setting fielddata=true for the category_ids field after every reindex. After every reindex fielddata values are reset. so we were written a script which set fielddata=true for the particular field after every reindex.

| improve this answer | |
  • How to do that? – Feedlay Technologies Jul 18 at 6:28
  • You have to set this from kibana interfacr – seeni Jul 18 at 6:57
  • Actually i have magento2.3.4 and google cloud serve so in that how i can access that ? – Feedlay Technologies Jul 18 at 8:38

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.