Class Field

java.lang.Object
de.cxp.ocs.config.Field
Direct Known Subclasses:
IndexedField

public class Field extends Object
  • Field Details

    • name

      @NonNull protected @NonNull String name
      Sets the name of the field used in the Elasticsearch index.
  • Constructor Details

    • Field

      public Field()
  • Method Details

    • isVariantLevel

      public boolean isVariantLevel()
      Checks if the field is indexed on variant level.
      Returns:
      true if the field is on variant level, false otherwise.
    • isMasterLevel

      public boolean isMasterLevel()
      Checks if the field is indexed on master level.
      Returns:
      true if the field is on master level, false otherwise.
    • isBothLevel

      public boolean isBothLevel()
      Checks if the field is be indexed on both - master and variant - level.
      Returns:
      true if the field is on both level, false otherwise.
    • addSourceName

      public Field addSourceName(String name)
      Adds the specified name to the source names list.
      Parameters:
      name - the name to add to the list of source names.
      Returns:
      this instance.
    • hasUsage

      public boolean hasUsage(FieldUsage searchedUsage)
    • setUsage

      public Field setUsage(FieldUsage usage1, FieldUsage... usages)
    • setUsage

      public Field setUsage(Collection<FieldUsage> usages)