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