Issuing SearchRequest using .json file

Hey all,

I got a .json file containing the following query:
{
"query":{
"match":{
"_id":"1"
}
}
}

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.

regards,
Jan

Here is what I did:

String source = convertFileToString(filePath);
SearchResponse response = client.prepareSearch(index)
.setSource(source)
.setTypes(types)
.get();

but the response is always NULL.