Skip to content

Instantly share code, notes, and snippets.

@ApiOperation(value = "Raw search (returns ES response)")
@RequestMapping(value = {"/rs/**"}, method = {RequestMethod.GET, RequestMethod.POST, RequestMethod.HEAD} /*, produces = "text/json" */)
@ResponseStatus(HttpStatus.OK)
//@ResponseBody
public void rawSearch(@RequestBody(required = false) String body, HttpMethod method, HttpServletRequest request,
HttpServletResponse response, HttpEntity<String> httpEntity) throws FairSearchServiceException, IOException, Exception {
String server = "http://localhost:9200/";
String jsonContent = "";
URI uri;