Interface IndexDescriptor
- All Known Subinterfaces:
ElasticsearchIndexDescriptor
- All Known Implementing Classes:
AbstractIndexModel
public interface IndexDescriptor
A descriptor of an index, exposing in particular the available fields and their characteristics.
-
Method Summary
Modifier and TypeMethodDescriptionOptional
<? extends AnalyzerDescriptor> Looks up the configured analyzers available to the index represented by this descriptor.Collection
<? extends AnalyzerDescriptor> Get a field by its path.Optional
<? extends NormalizerDescriptor> normalizer
(String name) Looks up the configured normalizers available to the index represented by this descriptor.Collection
<? extends NormalizerDescriptor> root()
Get all statically-defined fields for this index.
-
Method Details
-
hibernateSearchName
String hibernateSearchName()- 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.
-
root
- Returns:
- A descriptor of the
root element
of this index.
-
field
Get a field by its path.This method can find static fields as well as dynamic fields, unlike
staticFields()
.- Parameters:
absolutePath
- An absolute, dot-separated path.- Returns:
- The corresponding field, or
Optional.empty()
if no field exists with this path.
-
staticFields
Collection<IndexFieldDescriptor> staticFields()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.- Returns:
- A collection containing all fields.
-
analyzer
Looks up the configured analyzers available to the index represented by this descriptor.- Parameters:
name
- The name of the analyzer.- Returns:
- An
empty optional
if there is no analyzer configured with the given name.
-
analyzers
- Returns:
- A collection of configured analyzer descriptors available to the index represented by this descriptor.
-
normalizer
Looks up the configured normalizers available to the index represented by this descriptor.- Parameters:
name
- The name of the normalizer.- Returns:
- An
empty optional
if there is no normalizer configured with the given name.
-
normalizers
- Returns:
- A collection of configured normalizer descriptors available to the index represented by this descriptor.
-