How to search dynamically in the indexex from java web application

Hi,

I have created a Spring MVC based web application. I have added the spring-data-integration libraries to that application to work with elasticsearch indices.

The architecture of the application is:

I want to create a database table and load the data (around 25 million or more records) from a CSV file using the a data integrator tool.
Using the Logstash I want to create a elasticsearch indices on that table.
Created a Spring MVC application and included the spring-data-elesticsearch libraries.
Written a java class to connect the elasticsearch server and get the data .

Upto this is working fine.... Now the next thing I want is dynamically querying the data

I have a web page which will allows the end user to select the filter criteria completely dynamic
(For example age greater or less than a number, salary greater or less than a number, location in ('aa','bb'.'cc') etc. conditional all are optional conditions.

How do we form this dynamic query and send it to elastic search to get the results.

Note: when we query on a relational database we can form the query in java code and then using the JDBC we can execute the query. I wan the similar functionality.

Any help is appreciated. If any body could guide me I am happy to contribute to the project on this.

Regards
Khaleel

Did you see the Java documentation ? https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/search.html
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/query-dsl-queries.html