-
Notifications
You must be signed in to change notification settings - Fork 436
Open
Description
In our cluster, we pre-create the index with custom mappings, analyzers, and other configurations.
Currently, the connector always attempts to create the index, which is unnecessary in our setup:
Lines 240 to 244 in d394475
private void ensureIndexExists(String index) { | |
if (!indexCache.contains(index)) { | |
log.info("Creating index {}.", index); | |
client.createIndexOrDataStream(index); | |
indexCache.add(index); |
Although it does not create it again, it does issue an unnecessary call(and generates confusing logs) to our cluster
Lines 408 to 412 in d394475
GetIndexRequest request = new GetIndexRequest(index); | |
return callWithRetries( | |
"check if index " + index + " exists", | |
() -> client.indices().exists(request, RequestOptions.DEFAULT) | |
); |
The connector should be configurable to assume the index already exists and skip index creation attempts.
Metadata
Metadata
Assignees
Labels
No labels