class ESManager implements Constants {

    public static void deleteOldDocuments(String index, String type, String field, String value) {
        String deleteJson = "{\"query\": {\"bool\": {\"must_not\": [{ \"match\": {\"" + field + "\":\"" + value
                + "\"}}]}}}";
        try {
            invokeAPI("POST", index + "/" + type + "/" + "_delete_by_query", deleteJson);
        } catch (IOException e) {
            LOGGER.error("Error deleteOldDocuments ", e);
        }
    }

}