Class AbstractIndexModel<S extends AbstractIndexModel<?,R,F>,R extends IndexCompositeNode<?,?,?>,F extends IndexField<?,?>>
java.lang.Object
org.hibernate.search.engine.backend.document.model.spi.AbstractIndexModel<S,R,F>
- All Implemented Interfaces:
IndexDescriptor
,EventContextProvider
public abstract class AbstractIndexModel<S extends AbstractIndexModel<?,R,F>,R extends IndexCompositeNode<?,?,?>,F extends IndexField<?,?>>
extends Object
implements EventContextProvider, IndexDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractIndexModel
(AnalysisDescriptorRegistry analysisDescriptorRegistry, String hibernateSearchIndexName, String mappedTypeName, IndexIdentifier identifier, R root, Map<String, F> staticFields, List<? extends AbstractIndexFieldTemplate<? super S, ? extends F, ? super R, ?>> fieldTemplates) -
Method Summary
Modifier and TypeMethodDescriptionOptional
<? extends AnalyzerDescriptor> Looks up the configured analyzers available to the index represented by this descriptor.Collection
<? extends AnalyzerDescriptor> final EventContext
final Optional
<IndexFieldDescriptor> Get a field by its path.final F
fieldOrNull
(String absolutePath) final F
fieldOrNull
(String absolutePath, IndexFieldFilter filter) final String
final String
Optional
<? extends NormalizerDescriptor> normalizer
(String name) Looks up the configured normalizers available to the index represented by this descriptor.Collection
<? extends NormalizerDescriptor> final R
root()
protected abstract S
self()
final Collection
<IndexFieldDescriptor> Get all statically-defined fields for this index.toString()
-
Constructor Details
-
AbstractIndexModel
public AbstractIndexModel(AnalysisDescriptorRegistry analysisDescriptorRegistry, String hibernateSearchIndexName, String mappedTypeName, IndexIdentifier identifier, R root, Map<String, F> staticFields, List<? extends AbstractIndexFieldTemplate<? super S, ? extends F, ? super R, ?>> fieldTemplates)
-
-
Method Details
-
toString
-
self
-
eventContext
- Specified by:
eventContext
in interfaceEventContextProvider
-
hibernateSearchName
- Specified by:
hibernateSearchName
in interfaceIndexDescriptor
- Returns:
- The name that uniquely identifies this index within the backend. This is the Hibernate Search name; the name of the index on the filesystem or in Elasticsearch may be different (lowercased, with a suffix, ...). See the reference documentation of your backend for more information.
-
identifier
-
root
- Specified by:
root
in interfaceIndexDescriptor
- Returns:
- A descriptor of the
root element
of this index.
-
field
Description copied from interface:IndexDescriptor
Get a field by its path.This method can find static fields as well as dynamic fields, unlike
IndexDescriptor.staticFields()
.- Specified by:
field
in interfaceIndexDescriptor
- Parameters:
absolutePath
- An absolute, dot-separated path.- Returns:
- The corresponding field, or
Optional.empty()
if no field exists with this path.
-
fieldOrNull
-
fieldOrNull
-
staticFields
Description copied from interface:IndexDescriptor
Get all statically-defined fields for this index.Only statically-defined fields are returned; fields created dynamically through
templates
are not included in the collection.- Specified by:
staticFields
in interfaceIndexDescriptor
- Returns:
- A collection containing all fields.
-
analyzer
Description copied from interface:IndexDescriptor
Looks up the configured analyzers available to the index represented by this descriptor.- Specified by:
analyzer
in interfaceIndexDescriptor
- Parameters:
name
- The name of the analyzer.- Returns:
- An
empty optional
if there is no analyzer configured with the given name.
-
analyzers
- Specified by:
analyzers
in interfaceIndexDescriptor
- Returns:
- A collection of configured analyzer descriptors available to the index represented by this descriptor.
-
normalizer
Description copied from interface:IndexDescriptor
Looks up the configured normalizers available to the index represented by this descriptor.- Specified by:
normalizer
in interfaceIndexDescriptor
- Parameters:
name
- The name of the normalizer.- Returns:
- An
empty optional
if there is no normalizer configured with the given name.
-
normalizers
- Specified by:
normalizers
in interfaceIndexDescriptor
- Returns:
- A collection of configured normalizer descriptors available to the index represented by this descriptor.
-
mappedTypeName
-