I know out of the box the Magento search allows you to search by product sku. This is working fine on our site. However, if you have a product with a custom option that appends to the sku, searching by the whole sku does not return any results. So, for example, a simple product with the sku of 1234 with custom options set to add -S,-M, or -L depending on the selection, can be found in a frontend search using "1234" but not "1234-M" Is there any way to have the 1234-M return the correct product?
Check this extension https://mirasvit.com/magento-2-extensions/sphinx-search-ultimate.html
It support search by associated products skus and search by custom options