magento2 – Catalog search engine Unknown error

I have problems completing the Catalog Search indexer. All the other indexers are fine.

Here is the exact error taking from shell

Indexer catalog search process unknown error:
Notice: Indefinite displacement: 1 in
/ home / tbyte / public_html / vendor / magento / module-catalog-
search / Model / Indexer / Fulltext / Action / Full.php on line 384

Inside full.php on line 384 is:

$ productIndex = [$productData['entity_id'] => $ productsAttributes[$productData['entity_id']]];

indexer: the state shows 0 in the accumulated work, but the state of the search in the catalog is Reindex Required.

I have tried the following in vain:

  1. Reinstall Magento by changing the name of env.php
  2. Commands like setup: di: compile, db-schema upgrade, cache: clean, etc.

This problem prevents products from being displayed on the front.

I'm running Magento 2.2.6