Skip to content

Add option to skip the index creation/index check #877

@yeikel

Description

@yeikel

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:

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

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions