Package com.flowable.indexing
Interface IndexManager
- All Known Implementing Classes:
IndexManagerImpl
public interface IndexManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates the indices for all known mappingscom.fasterxml.jackson.databind.JsonNode
createIndexWithAlias
(String alias) Creates an index.createIndexWithoutAlias
(String index) Similar tocreateIndexWithAlias(String)
, but doesn't create an alias, only the index with the mapping.void
Deletes the given index and all its aliases.void
Deletes all indices registered in the systemvoid
deleteIndex
(String indexName) Deletes the index with the given name.findIndexMapping
(String indexName) findMatchingCustomMappings
(String indexName) Returns a list ofIndexMapping
(s) that are applicable for the provided index name.findMatchingIndexMappings
(com.fasterxml.jackson.databind.node.ObjectNode objectNode) Returns a list ofIndexMapping
instances that are applicable for the provided data.findMatchingIndexMappings
(String mappingType) Returns a list ofIndexMapping
(s) that are applicable for the provided mapping type.getCustomQueryMapping
(String indexName, String mappingName) Get custom query mapping for given index if exists.getESIndexName
(String indexName) Returns the internal index name for the provided raw index name.getIndexConfiguration
(String indexName) Returns the mapping information for the given index.Returns the prefix that is added to all indices.boolean
isKnownIndex
(String index) Returns whether the index is a known mapped index.recreateMapping
(IndexMapping indexMapping) Used to recreate mapping ifCustomIndexConfiguration
changed.boolean
reloadIndex
(String alias) Reloads selected indexboolean
Reloads all indexes
-
Method Details
-
getIndexNamePrefix
String getIndexNamePrefix()Returns the prefix that is added to all indices. Empty by default. -
getESIndexName
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
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
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
Deletes the given index and all its aliases. Or, when the name is an alias, deletes the alias and all indices. -
deleteIndex
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
Returns whether the index is a known mapped index. This is useful when parsing queries. -
findMatchingIndexMappings
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
Creates the indices for all known mappings -
createIndexesAndCustomAliasesFromMappings
void createIndexesAndCustomAliasesFromMappings() -
reloadIndices
boolean reloadIndices()Reloads all indexes -
reloadIndex
Reloads selected index
-