Class IndexTemplateComposerImpl
java.lang.Object
com.flowable.indexing.config.composer.IndexTemplateComposerImpl
- All Implemented Interfaces:
IndexTemplateComposer
public class IndexTemplateComposerImpl extends java.lang.Object implements IndexTemplateComposer
-
Field Summary
Fields Modifier and Type Field Description protected int
attachmentIndexedChars
protected boolean
chineseEnabled
protected ElasticsearchCompatibility
elasticsearchCompatibility
protected static org.slf4j.Logger
LOGGER
protected int
ngramEdgeMaxChar
protected int
ngramEdgeMinChar
protected int
ngramMaxChar
protected int
ngramMaxDiff
protected int
ngramMinChar
protected int
numberOfReplicas
protected int
numberOfShards
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected java.lang.String
refreshInterval
-
Constructor Summary
Constructors Constructor Description IndexTemplateComposerImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility)
-
Method Summary
Modifier and Type Method Description protected void
addMappingMetaVersion(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode mappings)
protected void
addSettings(CustomIndexConfiguration indexConfiguration, com.fasterxml.jackson.databind.node.ObjectNode jsonNode)
Add the settings to the index template.protected java.lang.String
composeCustomAliasTemplate(CustomIndexConfiguration indexConfiguration, java.lang.String indexPrefix)
protected java.lang.String
composeCustomQueryTemplate(CustomIndexConfiguration indexConfiguration)
java.lang.String
composeIndexTemplate(CustomIndexConfiguration indexConfiguration, java.lang.String indexPrefix)
Create the Elasticsearch index template for the given index configuration as a JSON string.java.util.Map<java.lang.String,java.lang.Object>
createDefaultIndexSettings()
java.util.Map<java.lang.String,java.lang.Object>
createIndexSettings(CustomIndexConfiguration configuration)
int
getAttachmentIndexedChars()
int
getNgramEdgeMaxChar()
int
getNgramEdgeMinChar()
int
getNgramMaxChar()
int
getNgramMaxDiff()
int
getNgramMinChar()
int
getNumberOfReplicas()
int
getNumberOfShards()
protected com.fasterxml.jackson.databind.node.ObjectNode
getOrCreateObjectNode(com.fasterxml.jackson.databind.node.ObjectNode objectNode, java.lang.String fieldName)
java.lang.String
getRefreshInterval()
void
setAttachmentIndexedChars(int attachmentIndexedChars)
void
setChineseEnabled(boolean chineseEnabled)
void
setNgramEdgeMaxChar(int ngramEdgeMaxChar)
void
setNgramEdgeMinChar(int ngramEdgeMinChar)
void
setNgramMaxChar(int ngramMaxChar)
void
setNgramMaxDiff(int ngramMaxDiff)
void
setNgramMinChar(int ngramMinChar)
void
setNumberOfReplicas(int numberOfReplicas)
void
setNumberOfShards(int numberOfShards)
void
setRefreshInterval(java.lang.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
protected java.lang.String 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
public java.lang.String composeIndexTemplate(CustomIndexConfiguration indexConfiguration, java.lang.String indexPrefix)Description copied from interface:IndexTemplateComposer
Create the Elasticsearch index template for the given index configuration as a JSON string.- Specified by:
composeIndexTemplate
in 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 java.lang.String composeCustomAliasTemplate(CustomIndexConfiguration indexConfiguration, java.lang.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, java.lang.String fieldName) -
createDefaultIndexSettings
public java.util.Map<java.lang.String,java.lang.Object> createDefaultIndexSettings() -
createIndexSettings
public java.util.Map<java.lang.String,java.lang.Object> createIndexSettings(CustomIndexConfiguration configuration) -
getNumberOfShards
public int getNumberOfShards() -
setNumberOfShards
public void setNumberOfShards(int numberOfShards) -
getNumberOfReplicas
public int getNumberOfReplicas() -
setNumberOfReplicas
public void setNumberOfReplicas(int numberOfReplicas) -
getRefreshInterval
public java.lang.String getRefreshInterval() -
setRefreshInterval
public void setRefreshInterval(java.lang.String refreshInterval) -
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)
-