Hi thanks for reverting back.
here is the query which i have wrote to get the output but it seems I have hard coded the field values here.
QueryBuilder searchName = QueryBuilders.matchQuery("updateDetails.properties.name", name);
QueryBuilder searchDob = QueryBuilders.matchQuery("updateDetails.properties.dob", dob);
QueryBuilder searchGender = QueryBuilders.matchQuery("updateDetails.properties.gender", gender);
BoolQueryBuilder findUserDetails = QueryBuilders.boolQuery().must(searchPpo).must(searchName).must(searchDob)
SearchResponse responseWithAllParam = client.search(searchRequest);
Here if you see in first line of the code I have hardcoded the value with "updateDetails", "properties" and "name". If in future some one will change the field name itself then we will not be able to fetch the data and will get 404 error.
Is there some way that we can remove the hardcoded value of fieldName?