Interface IndexDescriptor
-
public interface IndexDescriptorA descriptor of an index, exposing in particular the available fields and their characteristics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<IndexFieldDescriptor>field(String absolutePath)Get a field by its path.StringhibernateSearchName()IndexCompositeElementDescriptorroot()Collection<IndexFieldDescriptor>staticFields()Get all statically-defined fields for this index.
-
-
-
Method Detail
-
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
IndexCompositeElementDescriptor root()
- Returns:
- A descriptor of the
root elementof this index.
-
field
Optional<IndexFieldDescriptor> field(String absolutePath)
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
templatesare not included in the collection.- Returns:
- A collection containing all fields.
-
-