Elasticsearch error

Elasticsearch has been working fine for several days since it was installed. Last night I ran the Optimize in ES. This morning ES fails to work and I get a "No results found." when I try to search for anything.

On the server I can stop and start ES and all indications is that it's running on the server. I see the following errors in my ACP Server Error Log.

Last night when the Elasticsearch Setup page showed Optimize I clicked it, I suspect that messed up the index. This morning (after noticing ES wasn't working) I looked at the Elasticsearch Setup page, I clicked the Delete Index and from what I can tell nothing happened. What fixed the problem was to go to the Rebuild Caches screen and doing a Rebuild Search Index.

It would be great if the Elasticsearch Setup page would provide an indication if a Search Index existed. So after you delete the Search Index it would show there isn't one and explain that you need to go to the Rebuild Caches page and rebuild your search index cache.

"A rebuild is not required, but to get the benefits, you will need to. But to get the benefits, you need to click "optimize" on the ES setup page, which would then force you to reindex as it would remove all of the old data"

Thanks Graham. Yes that's the thread that triggered me to try and optimize. When we optimize a MySQL table it doesn't require rebuilding the index and that's why I thought it would be similar with ES. Clicking Optimize in ES should trigger the index rebuild.