Package ca.uhn.fhir.jpa.search.elastic
Class IndexNamePrefixLayoutStrategy
java.lang.Object
ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy
- All Implemented Interfaces:
org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
@Service
public class IndexNamePrefixLayoutStrategy
extends Object
implements org.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
This class instructs hibernate search on how to create index names for indexed entities.
In our case, we use this class to add an optional prefix to all indices which are created, which can be controlled via
JpaStorageSettings.setHSearchIndexPrefix(String)
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateInitialElasticsearchIndexName
(String hibernateSearchIndexName) createReadAlias
(String hibernateSearchIndexName) createWriteAlias
(String hibernateSearchIndexName) extractUniqueKeyFromElasticsearchIndexName
(String elasticsearchIndexName) extractUniqueKeyFromHibernateSearchIndexName
(String hibernateSearchIndexName)
-
Field Details
-
NAME
- See Also:
-
UNIQUE_KEY_EXTRACTION_PATTERN
-
-
Constructor Details
-
IndexNamePrefixLayoutStrategy
public IndexNamePrefixLayoutStrategy()
-
-
Method Details
-
createInitialElasticsearchIndexName
- Specified by:
createInitialElasticsearchIndexName
in interfaceorg.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
-
createWriteAlias
- Specified by:
createWriteAlias
in interfaceorg.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
-
createReadAlias
- Specified by:
createReadAlias
in interfaceorg.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
-
extractUniqueKeyFromHibernateSearchIndexName
- Specified by:
extractUniqueKeyFromHibernateSearchIndexName
in interfaceorg.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
-
extractUniqueKeyFromElasticsearchIndexName
- Specified by:
extractUniqueKeyFromElasticsearchIndexName
in interfaceorg.hibernate.search.backend.elasticsearch.index.layout.IndexLayoutStrategy
-