Class LuceneBackendImpl
java.lang.Object
org.hibernate.search.backend.lucene.impl.LuceneBackendImpl
- All Implemented Interfaces:
LuceneBackend,Backend,BackendImplementor
-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.apache.lucene.analysis.Analyzer>createIndexManagerBuilder(String indexName, String mappedTypeName, BackendBuildContext context, BackendMapperContext backendMapperContext, ConfigurationPropertySource propertySource) name()Optional<org.apache.lucene.analysis.Analyzer>normalizer(String name) preStop()Prepare forBackendImplementor.stop().voidstart(BackendStartContext context) Start any resource necessary to operate the backend at runtime.voidstop()Stop and release any resource necessary to operate the backend at runtime.toAPI()toString()<T> TUnwrap the backend to some implementation-specific type.
-
Method Details
-
toString
-
start
Description copied from interface:BackendImplementorStart any resource necessary to operate the backend at runtime.Called by the engine once after bootstrap, before
IndexManagerImplementor.start(IndexManagerStartContext)is called on the index managers.- Specified by:
startin interfaceBackendImplementor- Parameters:
context- The start context.
-
preStop
Description copied from interface:BackendImplementorPrepare forBackendImplementor.stop().- Specified by:
preStopin interfaceBackendImplementor- Returns:
- A future that completes when ongoing works complete.
-
stop
public void stop()Description copied from interface:BackendImplementorStop and release any resource necessary to operate the backend at runtime.Called by the engine once before shutdown.
- Specified by:
stopin interfaceBackendImplementor
-
unwrap
Description copied from interface:BackendUnwrap the backend to some implementation-specific type. -
name
- Specified by:
namein interfaceBackend- Returns:
- The name of the backend. In case of a default backend -
an empty optional.
-
toAPI
- Specified by:
toAPIin interfaceBackendImplementor- Returns:
- The object that should be exposed as API to users.
-
analyzer
- Specified by:
analyzerin interfaceLuceneBackend- Parameters:
name- An analyzer name, e.g. a name returned byIndexValueFieldTypeDescriptor.analyzerName()orIndexValueFieldTypeDescriptor.searchAnalyzerName().- Returns:
- The corresponding analyzer, or
Optional.empty()if it doesn't exist.
-
normalizer
- Specified by:
normalizerin interfaceLuceneBackend- Parameters:
name- A normalizer name, e.g. a name returned byIndexValueFieldTypeDescriptor.normalizerName().- Returns:
- The corresponding normalizer, or
Optional.empty()if it doesn't exist.
-
createIndexManagerBuilder
public IndexManagerBuilder createIndexManagerBuilder(String indexName, String mappedTypeName, BackendBuildContext context, BackendMapperContext backendMapperContext, ConfigurationPropertySource propertySource) - Specified by:
createIndexManagerBuilderin interfaceBackendImplementor- Parameters:
indexName- The name of the index from the point of view of Hibernate Search. A slightly different name may be used by the backend internally, butindexNameis the one that will appear everywhere the index is mentioned to the user.mappedTypeName- The name of the type mapped to this index. This is the type name that will be assigned to search query hits for this index, allowing the mapper to resolve the type of each hit in multi-index searches. Each index is mapped to one and only one type.context- The build contextpropertySource- A configuration property source, appropriately masked so that the backend doesn't need to care about Hibernate Search prefixes (hibernate.search.*, etc.). All the properties can be accessed at the root. CAUTION: the property keys listed inIndexSettingsare reserved for use by the engine.- Returns:
- A builder for index managers targeting this backend.
-