The best open source alternative to elasticsearch is Apache Solr, which is both free and Open Source. If that doesn't suit you, our users have ranked more than 50 alternatives to elasticsearch and many of them is open source so hopefully you can find a suitable replacement. Other interesting open source alternatives to elasticsearch are Sphinx (search engine) (Free, Open Source), MeiliSearch (Free, Open Source), Golem (Free, Open Source) and Apache Lucene (Free, Open Source).
Solr is an open source enterprise search server based on Lucene search library, with XML/HTTP and JSON APIs. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, and rich document handling.
Almost everyone thinks Apache Solr is a great alternative to elasticsearch.
Sphinx is a free software search engine designed with indexing database content in mind. It currently supports MySQL, PostgreSQL, and ODBC-compliant databases as data sources natively. Other data sources can be indexed via pipe in a custom XML format.
Almost everyone thinks Sphinx (search engine) is a great alternative to elasticsearch.
High-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. Apache Lucene is a open source.