I am using the Java Client to form match queries but unable to do so. I found the same issue had been raised in ElasticSearch project.
Here is the link to the original issue.
I have run into the same issue. How can I perform a simple match query like below?
{
"query": {
"match": {
"lastName": "Bruce"
}
}
}
SearchRequest searchRequest = new SearchRequest.Builder()
.index("sample-index")
.query(q -> q
.match(
// what to use here ??
))
.build();
The solution suggests to use SearchSourceBuilder
class which is not even available in the OpenSource client jars.
Kindly let me know the solution.