We imported ~300M configurable digital products (~900M products totally) & noticed that search time is more than 20 seconds & sometimes we get "Too long request" error. I separately did a search queries to ElasticSearch & MySQL. Everything works fast. There is absolutely no stress. Probably there are some problems with default search settings? Would be very glad if somebody suggest how to fix that. Thanks in advance
900M SKUs is a lot. What are you using specifically for your site search engines? Defualt implementation of Elastic? Which version of Magento? What kind of infrastructure are you running this installation on?
Default settings on ElasticSearch
Magento 2.4.6
DB Container: 126 GB DDR4 Memory, 32 CPU Cores
ES Container: 200 GB DDR4 Memory, 32 CPU Cores
Web Server Container: 64 Gb DDR4 Memory, 8 CPU Cores
By Idea when we do search first ElasticSearch returns IDs & then DB selection will be made by provided IDs
Query curl localhost:9200/<INDEX>/_search?q=New+York+skyline+evening on production goes 0.5 secs across 300M documents