If you face the issue Elasticsearch not working follow this step mentioned in this article to understand, install and configure Magento 2 Elasticsearch on Ubuntu easily.
How To Install And Configure Magento 2 Elasticsearch