public final class ConfigContext extends Object
Analyzer
or default
Similarity
) and checks whether certain optional libraries are available.Constructor and Description |
---|
ConfigContext(SearchConfiguration searchConfiguration,
BuildContext buildContext) |
ConfigContext(SearchConfiguration searchConfiguration,
BuildContext buildContext,
SearchMapping searchMapping,
Map<IndexManagerType,AnalyzerRegistry> previousAnalyzerRegistries) |
Modifier and Type | Method and Description |
---|---|
void |
addAnalyzerDef(AnalyzerDef analyzerDef,
org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement)
Add an analyzer definition which was defined as annotation.
|
void |
addFullTextFilterDef(FullTextFilterDef filterDef,
org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement)
Add a full-filter definition which was defined as annotation
|
void |
addGlobalAnalyzerDef(AnalyzerDef analyzerDef) |
void |
addGlobalFullTextFilterDef(FullTextFilterDef filterDef) |
MutableAnalyzerRegistry |
getAnalyzerRegistry(IndexManagerType type) |
Map<FieldBridge,ClassBridge> |
getClassBridgeInstances(Class<?> type)
Returns class bridge instances configured via the programmatic API, if any.
|
String |
getDefaultNullToken() |
ServiceManager |
getServiceManager() |
Map<IndexManagerType,AnalyzerRegistry> |
initAnalyzerRegistries(IndexManagerHolder indexesFactory)
Initialize the named analyzer references created throughout the mapping creation
with the analyzer definitions collected throughout the mapping creation.
|
Map<String,FilterDef> |
initFilters() |
boolean |
isJpaPresent() |
boolean |
isProvidedIdImplicit() |
public ConfigContext(SearchConfiguration searchConfiguration, BuildContext buildContext)
public ConfigContext(SearchConfiguration searchConfiguration, BuildContext buildContext, SearchMapping searchMapping, Map<IndexManagerType,AnalyzerRegistry> previousAnalyzerRegistries)
public ServiceManager getServiceManager()
public void addAnalyzerDef(AnalyzerDef analyzerDef, org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement)
analyzerDef
- the analyzer definition annotationannotatedElement
- the annotated element it was defined onpublic void addFullTextFilterDef(FullTextFilterDef filterDef, org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement)
filterDef
- the filter definition annotationannotatedElement
- the annotated element it was defined onpublic void addGlobalAnalyzerDef(AnalyzerDef analyzerDef)
public void addGlobalFullTextFilterDef(FullTextFilterDef filterDef)
public MutableAnalyzerRegistry getAnalyzerRegistry(IndexManagerType type)
public String getDefaultNullToken()
public Map<IndexManagerType,AnalyzerRegistry> initAnalyzerRegistries(IndexManagerHolder indexesFactory)
Analyzer definitions and references are handled simultaneously during the mapping creation, so it's actually possible that, while creating the mapping, we encounter references to analyzer which haven't been defined yet.
To work around this issue, we do not resolve references immediately, but instead
create "dangling" references whose initialization will be delayed to the end of
the mapping (see getAnalyzerRegistry(IndexManagerType)
).
This method executes the final initialization, resolving dangling references.
indexesFactory
- The index manager holder, giving access to the relevant index manager types.public boolean isJpaPresent()
public boolean isProvidedIdImplicit()
public Map<FieldBridge,ClassBridge> getClassBridgeInstances(Class<?> type)
@ClassBridge
annotations representing the corresponding analyzer etc. configuration.type
- the type for which to return the configured class bridge instancesnull
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved