I know, title is a little confusing but the problem is, too. I am working on a company, it has several different applications and wants these applications have search functionality. We have developed a package and used Elasticsearch for a Laravel-powered application, it was time comsuming. Now, we want to add search functionality to some applications which were written with Codeigniter, Spring and ASP.NET. We have thought to set up an Elasticsearch cluster, put an application in front of it which behaves a reverse proxy and integrate all of these applications with this search middleware. This proxy application will do authorization and authentication, client(integrated application) and index management, automatic mapping and indexing taking related URLs from clients and providing a variety of search interfaces such as HTML, iframe and JSON.
If we use a proxy application in front of Elasticsearch, our applications will just provide mapping and indexing URLs and implement search interface, and the proxy application will handle other issues. But if we write or use packages for all of our applications, we will have to handle all these issues in every different application and the proxy application will not be developed.
Which solution should we use and why?