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
(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 TypeMethodDescriptionfinal 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
final R
root()
protected abstract S
self()
final Collection<IndexFieldDescriptor>
Get all statically-defined fields for this index.toString()
-
Constructor Details
-
AbstractIndexModel
-
-
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.
-
mappedTypeName
-