Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement dynamic schema update using index mapping difference #18622

188 changes: 0 additions & 188 deletions tasklist/.idea/compiler.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*/
package io.camunda.tasklist.property;

import java.util.Map;

public class TasklistElasticsearchProperties extends ElasticsearchProperties {

public static final String DEFAULT_INDEX_PREFIX = "tasklist";
Expand All @@ -16,6 +18,8 @@ public class TasklistElasticsearchProperties extends ElasticsearchProperties {
private String indexPrefix = DEFAULT_INDEX_PREFIX;
private int numberOfShards = DEFAULT_NUMBER_OF_SHARDS;
private int numberOfReplicas = DEFAULT_NUMBER_OF_REPLICAS;
private Map<String, Integer> numberOfShardsPerIndex = Map.of();
private Map<String, Integer> numberOfReplicasPerIndices = Map.of();

private String refreshInterval = DEFAULT_REFRESH_INTERVAL;

Expand Down Expand Up @@ -54,4 +58,20 @@ public String getRefreshInterval() {
public void setRefreshInterval(final String refreshInterval) {
this.refreshInterval = refreshInterval;
}

public Map<String, Integer> getNumberOfShardsPerIndex() {
return numberOfShardsPerIndex;
}

public void setNumberOfShardsPerIndex(final Map<String, Integer> numberOfShardsPerIndex) {
this.numberOfShardsPerIndex = numberOfShardsPerIndex;
}

public Map<String, Integer> getNumberOfReplicasPerIndices() {
return numberOfReplicasPerIndices;
}

public void setNumberOfReplicasPerIndices(final Map<String, Integer> numberOfReplicasPerIndices) {
this.numberOfReplicasPerIndices = numberOfReplicasPerIndices;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,17 @@ public TasklistDocumentationProperties getDocumentation() {
public void setDocumentation(final TasklistDocumentationProperties documentation) {
this.documentation = documentation;
}

public String getIndexPrefix() {
if (database.equals(ELASTIC_SEARCH)) {
return elasticsearch.getIndexPrefix();
} else if (database.equals(OPEN_SEARCH)) {
return openSearch.getIndexPrefix();
}
return null;
}

public String getDatabaseType() {
return database;
}
}
6 changes: 6 additions & 0 deletions tasklist/els-schema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.2.0-jre</version>
nathansandi marked this conversation as resolved.
Show resolved Hide resolved
</dependency>

</dependencies>

</project>
Loading
Loading