public boolean indexExists(String indexName) throws Exception {
        final String url = esConfig.getOneHttpUrl() + InlongConstants.SLASH + indexName;
        try {
            return HttpUtils.headRequest(esConfig.getRestClient(), url, null, getHttpHeaders());
        } catch (NotFound e) {
            return false;
        }
    }
Check index exists.

@param indexName The elasticsearch index name
@return true or false
@throws Exception any exception if occurred
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/es/ElasticsearchApi.java