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 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

      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

      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

      @Incubating Optional<? extends AnalyzerDescriptor> analyzer(String name)
      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

      @Incubating Collection<? extends AnalyzerDescriptor> analyzers()
      Returns:
      A collection of configured analyzer descriptors available to the index represented by this descriptor.
    • normalizer

      @Incubating Optional<? extends NormalizerDescriptor> normalizer(String name)
      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

      @Incubating Collection<? extends NormalizerDescriptor> normalizers()
      Returns:
      A collection of configured normalizer descriptors available to the index represented by this descriptor.