Assert.hasText(resource, errorMessage);
// add compatibility for now
if (resource.contains("?") || resource.contains("&")) {
if (!StringUtils.hasText(settings.getQuery())) {
throw new EsHadoopIllegalArgumentException(String.format(
"Cannot specify a query in the target index and through %s", ConfigurationOptions.ES_QUERY));
}
// extract query
int index = resource.indexOf("?");