Interface Schema

All Known Subinterfaces:
IndexSchema
All Known Implementing Classes:
DefaultIndexSchema, DefaultSchema

@PublicSpi public interface Schema
A schema
Since:
10.4
  • Method Details

    • accept

      default <T> Stream<T> accept(FieldVisitor<T> visitor)
    • getFields

      Collection<Field> getFields()
      Returns:
      the fields defined in the index schema excluding id and version.
    • isDefined

      boolean isDefined(Field field)
      Returns:
      whether the given field is defined in this index schema.
    • isDefined

      boolean isDefined(String fieldName)
      Returns:
      whether the given field name is defined in this index schema.
    • getField

      Optional<Field> getField(String name)
      Obtains a field using name.
      Parameters:
      name - field name
      Returns:
      Optional containing the field if it exists, empty otherwise