Issuing SearchRequest using .json file

Hey all,

I got a .json file containing the following query:

I want to issue a search using this query but I cannot come up with a solution and there is nothing in the documentation (at least I couldnt finy anything). I expected to be as simple as converting the file into a string and set it as the query but it seems to be more complicated.


Here is what I did:

String source = convertFileToString(filePath);
SearchResponse response = client.prepareSearch(index)

but the response is always NULL.