Lorro… sorry, that only hides out of stock items “FROM THE CATALOG”. The OP’s question asks “How to hide out of stock items from search results?”
Apparently search results are a different breed (vs. archive listings), and “out of stock” items actually *DO* appear in the search results, even if the “Hide out of stock items from the catalog” option is selected…
Of course, you may explicitly identify these out-of-stock items as “private”, but that doesn’t prevent last-item-just-been-purchased out-of-stock to appear in the search results.
I have not found a straightforward method of preventing zero-stock items from appearing in search results, however, without this manual intervention. What am I missing?