code: protected Response createOk(Object entity, Long totalHits) {
      return Response
        .status(Response.Status.OK)
        .entity(entity)
        .header("Total-Results", totalHits)
        .build();
    }
docs: Constructs ok response
  
  @param entity payload
  @param totalHits total hits
  @return response