I have a requirement where I need to pass the elastic search query to the REST end_point like below:
{
query : {
match_all : {}
}
}
So, to do this, lets say, I am getting parameters from UI. Like AND, OR, GroupBy, "text to search", etc..
How can I achieve this in Java to dynamically build the query string?
I am new to elastic search, so exploring on the way to produce the query string.
Any suggestions would help.
EDIT 1: May be another way of asking the above: How can I convert "SearchSourceBuilder" or "QueryBuilder" to Json?