Class IndexTemplateComposerImpl
java.lang.Object
com.flowable.indexing.config.composer.IndexTemplateComposerImpl
- All Implemented Interfaces:
IndexTemplateComposer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprotected ElasticsearchCompatibilityprotected static final org.slf4j.Loggerprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected com.fasterxml.jackson.databind.ObjectMapperprotected String -
Constructor Summary
ConstructorsConstructorDescriptionIndexTemplateComposerImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMappingMetaVersion(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode mappings) protected voidaddSettings(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode jsonNode) Add the settings to the index template.protected StringcomposeCustomAliasTemplate(CustomIndexConfiguration indexConfiguration, String indexPrefix) protected StringcomposeCustomQueryTemplate(CustomIndexConfiguration indexConfiguration) composeIndexTemplate(CustomIndexConfiguration indexConfiguration, String indexPrefix) Create the Elasticsearch index template for the given index configuration as a JSON string.createIndexSettings(CustomIndexConfiguration configuration) intintintintintintintintprotected com.fasterxml.jackson.databind.node.ObjectNodegetOrCreateObjectNode(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String fieldName) voidsetAttachmentIndexedChars(int attachmentIndexedChars) voidsetChineseEnabled(boolean chineseEnabled) voidsetNgramEdgeMaxChar(int ngramEdgeMaxChar) voidsetNgramEdgeMinChar(int ngramEdgeMinChar) voidsetNgramMaxChar(int ngramMaxChar) voidsetNgramMaxDiff(int ngramMaxDiff) voidsetNgramMinChar(int ngramMinChar) voidsetNumberOfReplicas(int numberOfReplicas) voidsetNumberOfShards(int numberOfShards) voidsetRefreshInterval(String refreshInterval)
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
numberOfShards
protected int numberOfShards -
numberOfReplicas
protected int numberOfReplicas -
refreshInterval
-
attachmentIndexedChars
protected int attachmentIndexedChars -
ngramMinChar
protected int ngramMinChar -
ngramMaxChar
protected int ngramMaxChar -
ngramEdgeMinChar
protected int ngramEdgeMinChar -
ngramEdgeMaxChar
protected int ngramEdgeMaxChar -
ngramMaxDiff
protected int ngramMaxDiff -
chineseEnabled
protected boolean chineseEnabled -
elasticsearchCompatibility
-
-
Constructor Details
-
IndexTemplateComposerImpl
public IndexTemplateComposerImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility)
-
-
Method Details
-
composeIndexTemplate
Description copied from interface:IndexTemplateComposerCreate the Elasticsearch index template for the given index configuration as a JSON string.- Specified by:
composeIndexTemplatein interfaceIndexTemplateComposer- Parameters:
indexConfiguration- the index configuration to create the template for- Returns:
- the JSON string representation of the index template
-
composeCustomQueryTemplate
-
addMappingMetaVersion
protected void addMappingMetaVersion(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode mappings) -
composeCustomAliasTemplate
protected String composeCustomAliasTemplate(CustomIndexConfiguration indexConfiguration, String indexPrefix) -
addSettings
protected void addSettings(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode jsonNode) Add the settings to the index template. There are meaningful defaults built in, but to overwrite them, simply set their desired values through the appropriate setters while configuring this composer.- Parameters:
jsonNode- the node to add the settings to
-
getOrCreateObjectNode
protected com.fasterxml.jackson.databind.node.ObjectNode getOrCreateObjectNode(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String fieldName) -
createDefaultIndexSettings
-
createIndexSettings
-
getNumberOfShards
public int getNumberOfShards() -
setNumberOfShards
public void setNumberOfShards(int numberOfShards) -
getNumberOfReplicas
public int getNumberOfReplicas() -
setNumberOfReplicas
public void setNumberOfReplicas(int numberOfReplicas) -
getRefreshInterval
-
setRefreshInterval
-
getAttachmentIndexedChars
public int getAttachmentIndexedChars() -
setAttachmentIndexedChars
public void setAttachmentIndexedChars(int attachmentIndexedChars) -
getNgramMinChar
public int getNgramMinChar() -
setNgramMinChar
public void setNgramMinChar(int ngramMinChar) -
getNgramMaxChar
public int getNgramMaxChar() -
setNgramMaxChar
public void setNgramMaxChar(int ngramMaxChar) -
getNgramEdgeMinChar
public int getNgramEdgeMinChar() -
setNgramEdgeMinChar
public void setNgramEdgeMinChar(int ngramEdgeMinChar) -
getNgramEdgeMaxChar
public int getNgramEdgeMaxChar() -
setNgramEdgeMaxChar
public void setNgramEdgeMaxChar(int ngramEdgeMaxChar) -
getNgramMaxDiff
public int getNgramMaxDiff() -
setNgramMaxDiff
public void setNgramMaxDiff(int ngramMaxDiff) -
setChineseEnabled
public void setChineseEnabled(boolean chineseEnabled)
-