public interface IndexManager
Modifier and Type | Method and Description |
---|---|
void |
createIndexesAndCustomAliasesFromMappings() |
Map<String,com.fasterxml.jackson.databind.JsonNode> |
createIndexesFromMappings()
Creates the indices for all known mappings
|
com.fasterxml.jackson.databind.JsonNode |
createIndexWithAlias(String alias)
Creates an index.
|
String |
createIndexWithoutAlias(String index)
Similar to
createIndexWithAlias(String) , but doesn't create an alias, only the index with the mapping. |
void |
deleteAliasAndRelatedIndices(String alias)
Deletes the given index and all its aliases.
|
void |
deleteAllKnownIndices()
Deletes all indices registered in the system
|
void |
deleteIndex(String indexName)
Deletes the index with the given name.
|
IndexMapping |
findIndexMapping(String indexName) |
List<IndexMapping> |
findMatchingCustomMappings(String indexName)
Returns a list of
IndexMapping (s) that are applicable for the provided index name. |
List<IndexMapping> |
findMatchingIndexMappings(com.fasterxml.jackson.databind.node.ObjectNode objectNode)
Returns a list of
IndexMapping instances that are applicable for the provided data. |
List<IndexMapping> |
findMatchingIndexMappings(String mappingType)
Returns a list of
IndexMapping (s) that are applicable for the provided mapping type. |
IndexMapping |
getCustomQueryMapping(String indexName,
String mappingName)
Get custom query mapping for given index if exists.
|
String |
getESIndexName(String indexName)
Returns the internal index name for the provided raw index name.
|
CustomIndexConfiguration |
getIndexConfiguration(String indexName)
Returns the mapping information for the given index.
|
String |
getIndexNamePrefix()
Returns the prefix that is added to all indices.
|
boolean |
isKnownIndex(String index)
Returns whether the index is a known mapped index.
|
IndexMapping |
recreateMapping(IndexMapping indexMapping)
Used to recreate mapping if
CustomIndexConfiguration changed. |
boolean |
reloadIndex(String alias)
Reloads selected index
|
boolean |
reloadIndices()
Reloads all indexes
|
String getIndexNamePrefix()
String getESIndexName(String indexName)
indexName
- the index name as being used in configuration, query DSL and APIcom.fasterxml.jackson.databind.JsonNode createIndexWithAlias(String alias)
String createIndexWithoutAlias(String index)
createIndexWithAlias(String)
, but doesn't create an alias, only the index with the mapping.
Note that the index will still follow the aliasName-timeStamp pattern.
Note that the mapping will be looked up based on the name passed.IndexMapping recreateMapping(IndexMapping indexMapping)
CustomIndexConfiguration
changed.indexMapping
- IndexMapping getCustomQueryMapping(String indexName, String mappingName)
void deleteAliasAndRelatedIndices(String alias)
void deleteIndex(String indexName)
void deleteAllKnownIndices()
boolean isKnownIndex(String index)
List<IndexMapping> findMatchingIndexMappings(com.fasterxml.jackson.databind.node.ObjectNode objectNode)
IndexMapping
instances that are applicable for the provided data.List<IndexMapping> findMatchingIndexMappings(String mappingType)
IndexMapping
(s) that are applicable for the provided mapping type.List<IndexMapping> findMatchingCustomMappings(String indexName)
IndexMapping
(s) that are applicable for the provided index name.IndexMapping findIndexMapping(String indexName)
CustomIndexConfiguration getIndexConfiguration(String indexName)
Map<String,com.fasterxml.jackson.databind.JsonNode> createIndexesFromMappings()
void createIndexesAndCustomAliasesFromMappings()
boolean reloadIndices()
boolean reloadIndex(String alias)