Package com.flowable.indexing
Interface IndexManager
- All Known Implementing Classes:
IndexManagerImpl
public interface IndexManager
-
Method Summary
Modifier and Type Method Description void
createIndexesAndCustomAliasesFromMappings()
java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode>
createIndexesFromMappings()
Creates the indices for all known mappingscom.fasterxml.jackson.databind.JsonNode
createIndexWithAlias(java.lang.String alias)
Creates an index.java.lang.String
createIndexWithoutAlias(java.lang.String index)
Similar tocreateIndexWithAlias(String)
, but doesn't create an alias, only the index with the mapping.void
deleteAliasAndRelatedIndices(java.lang.String alias)
Deletes the given index and all its aliases.void
deleteAllKnownIndices()
Deletes all indices registered in the systemvoid
deleteIndex(java.lang.String indexName)
Deletes the index with the given name.IndexMapping
findIndexMapping(java.lang.String indexName)
java.util.List<IndexMapping>
findMatchingCustomMappings(java.lang.String indexName)
Returns a list ofIndexMapping
(s) that are applicable for the provided index name.java.util.List<IndexMapping>
findMatchingIndexMappings(com.fasterxml.jackson.databind.node.ObjectNode objectNode)
Returns a list ofIndexMapping
instances that are applicable for the provided data.java.util.List<IndexMapping>
findMatchingIndexMappings(java.lang.String mappingType)
Returns a list ofIndexMapping
(s) that are applicable for the provided mapping type.IndexMapping
getCustomQueryMapping(java.lang.String indexName, java.lang.String mappingName)
Get custom query mapping for given index if exists.java.lang.String
getESIndexName(java.lang.String indexName)
Returns the internal index name for the provided raw index name.CustomIndexConfiguration
getIndexConfiguration(java.lang.String indexName)
Returns the mapping information for the given index.java.lang.String
getIndexNamePrefix()
Returns the prefix that is added to all indices.boolean
isKnownIndex(java.lang.String index)
Returns whether the index is a known mapped index.IndexMapping
recreateMapping(IndexMapping indexMapping)
Used to recreate mapping ifCustomIndexConfiguration
changed.boolean
reloadIndex(java.lang.String alias)
Reloads selected indexboolean
reloadIndices()
Reloads all indexes
-
Method Details
-
getIndexNamePrefix
java.lang.String getIndexNamePrefix()Returns the prefix that is added to all indices. Empty by default. -
getESIndexName
java.lang.String getESIndexName(java.lang.String indexName)Returns the internal index name for the provided raw index name. As there might be an index-prefix in place, the index name towards the Elasticsearch client needs to use the internal name though which is returned using this method.- Parameters:
indexName
- the index name as being used in configuration, query DSL and API- Returns:
- the index name as being used towards Elasticsearch (might have a prefix)
-
createIndexWithAlias
com.fasterxml.jackson.databind.JsonNode createIndexWithAlias(java.lang.String alias)Creates an index. The index mapping that is used will need to have as 'name' the passed index name. In fact, creates both an alias with the given name and the actual index, prefixed with the project name and with a timestamp. This allows later to change indices, but keep the alias and reindex. -
createIndexWithoutAlias
java.lang.String createIndexWithoutAlias(java.lang.String index)Similar tocreateIndexWithAlias(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. -
recreateMapping
Used to recreate mapping ifCustomIndexConfiguration
changed.- Parameters:
indexMapping
-- Returns:
- Updated indexMapping
-
getCustomQueryMapping
Get custom query mapping for given index if exists. -
deleteAliasAndRelatedIndices
void deleteAliasAndRelatedIndices(java.lang.String alias)Deletes the given index and all its aliases. Or, when the name is an alias, deletes the alias and all indices. -
deleteIndex
void deleteIndex(java.lang.String indexName)Deletes the index with the given name. Does not delete the alias, if one exists. -
deleteAllKnownIndices
void deleteAllKnownIndices()Deletes all indices registered in the system -
isKnownIndex
boolean isKnownIndex(java.lang.String index)Returns whether the index is a known mapped index. This is useful when parsing queries. -
findMatchingIndexMappings
java.util.List<IndexMapping> findMatchingIndexMappings(com.fasterxml.jackson.databind.node.ObjectNode objectNode)Returns a list ofIndexMapping
instances that are applicable for the provided data. -
findMatchingIndexMappings
Returns a list ofIndexMapping
(s) that are applicable for the provided mapping type. -
findMatchingCustomMappings
Returns a list ofIndexMapping
(s) that are applicable for the provided index name. -
findIndexMapping
-
getIndexConfiguration
Returns the mapping information for the given index. -
createIndexesFromMappings
java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> createIndexesFromMappings()Creates the indices for all known mappings -
createIndexesAndCustomAliasesFromMappings
void createIndexesAndCustomAliasesFromMappings() -
reloadIndices
boolean reloadIndices()Reloads all indexes -
reloadIndex
boolean reloadIndex(java.lang.String alias)Reloads selected index
-