0
votes

I have a use case where I want to make search within the billions of records. I wanted to display that data on my UI. I know I can do with pagination, but the thing is the data is huge and we don't want to create any performance issue.

I am planning to use Elasticsearch with Java API but not sure how I can design. Please let me know if following solution will work

  1. Read the data from Oracle database and provide to Elasticsearch engine using Java API. I don't want manually to start elastic engine. Is there any way where I can embedded that server in my project?

  2. Write Elasticsearch client in Java code and make request for search. So search will happen on Elastic engine side and not the actual database.

Not sure how to implement this. Can someone guide me here? I did some research and I found the client code to make search request not the actual one which will make database hit and store in Elasticsearch engine in Java.

1
Elsaticsearch can run as a service so you don't have to start it manually Everytime. For a billion records you probably want to use a cluster of machines (which is what Elasticsearch is designed for) depending on the size of your records and how often you plan to add to/ update themsramalingam24

1 Answers

0
votes

Unfortunately with Elasticsearch you will have to run the server as a separate process and maintain it, like any other DBMS (and I doubt that a collection with a billion of objects will fit in one machine nicely). Moreover, High level Http client is the recommended way to access Elasticsearch from Java.

However, for the Java embedded search capabilies you may consider using Lucene directly.