Zend certified PHP/Magento developer

Magento 2: Product Removed from Elasticsearch After Indexing Customizable Options

I’m facing a peculiar issue with my Magento 2.3.6 application where products with customizable options are being removed from Elasticsearch after indexing. I’ve tried various customizable option types such as field, dropdown, and checkboxes, but the problem persists.

Upon debugging, I found that when I use var_dump($product->hasOptions()), it returns null. This seems to be a key indicator of the problem, but I’m unable to identify the root cause.

Here are the steps I’ve taken:

Checked and debugged Elasticsearch mapping.
Tried different customizable option types, but the issue persists.
Explored the product object inside FullText indexer with var_dump($product->hasOptions()), which returns null.

I’m reaching out for guidance on how to troubleshoot and resolve this issue. Any insights, suggestions, or potential solutions would be greatly appreciated.

Additional Information:
Magento version: 2.3.6
Elasticsearch version: 6.8.23