An exception is thrown on my search results page, but only for certain search text. If I search for "stov" (without the quotes), the results appear. If I search for "stove", an exception is thrown. There are several other search terms which work and don't work.
The instsance is Magento 2.4 using Elastic v7. Magento was recently upgraded from 2.3.5. I'm using a Porto theme and Wyomind extension for Autocomplete.
On the Elastic server, I put trace on inbound requests. When Magento produces this error, a search query does not reach the Catalog product index, in Elastic.
I rebuilt the index (indexer:reindex), and flush/clean the cache.
main.CRITICAL: Notice: Undefined index: hits in /chroot/home/.../vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder/Dynamic.php on line 63
Update 1: Could this be a memory issue, in Magento? I have a large catalog >500k items, running in a minimal environment, 2G. If it were a memory issue, would that show up in a log? I only see the error (above) in the system.log and exception.log.
Update 2: I've received the following error while trying to indexer:reindex catalogsearch_fulltext. I seem to be stuck on this point, unable to rebuild the index.
Catalog Search index process unknown error: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [position_category_1270] of different type, current_type [text], merged_type [integer]"}],"type":"illegal_argument_exception","reason":"mapper [position_category_1270] of different type, current_type [text], merged_type [integer]"},"status":400}