Class Index

java.lang.Object
com.yahoo.schema.Index
All Implemented Interfaces:
Serializable, Cloneable

public class Index extends Object implements Cloneable, Serializable
An index definition in a search definition. Two indices are equal if they have the same name and the same settings, except alias settings (which are excluded).
Author:
bratseth
See Also:
  • Constructor Details

    • Index

      public Index(String name)
    • Index

      public Index(String name, boolean prefix)
  • Method Details

    • setName

      public void setName(String name)
    • getName

      public String getName()
    • setRankType

      public void setRankType(RankType rankType)
      Sets the rank type of this field
    • getRankType

      public RankType getRankType()
      Returns the rank type of this field, or null if nothing is set
    • getStemming

      public Stemming getStemming()
      Return the stemming setting of this index, may be null
    • getStemming

      public Stemming getStemming(Schema schema)
      Whether this field should be stemmed in this search definition, this is never null
    • setStemming

      public void setStemming(Stemming stemming)
      Sets how this field should be stemmed, or set to null to use the default.
    • isPrefix

      public boolean isPrefix()
      Returns whether this index supports prefix search, default is false
    • setPrefix

      public void setPrefix(boolean prefix)
      Sets whether this index supports prefix search
    • addAlias

      public void addAlias(String alias)
      Adds an alias to this index name
    • aliasIterator

      public Iterator<String> aliasIterator()
      Returns a read-only iterator of the aliases (Strings) to this index name
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public Object clone()
      Makes a deep copy of this index
      Overrides:
      clone in class Object
    • copy

      public Index copy()
    • getType

      public Index.Type getType()
      Returns the index engine type
    • setType

      public void setType(Index.Type type)
      Sets the index engine type
    • getBooleanIndexDefiniton

      public BooleanIndexDefinition getBooleanIndexDefiniton()
      Returns the boolean index definition
    • setBooleanIndexDefiniton

      public void setBooleanIndexDefiniton(BooleanIndexDefinition def)
      Sets the boolean index definition
    • getHnswIndexParams

      public Optional<HnswIndexParams> getHnswIndexParams()
    • setHnswIndexParams

      public void setHnswIndexParams(HnswIndexParams params)
    • setInterleavedFeatures

      public void setInterleavedFeatures(boolean value)
    • useInterleavedFeatures

      public boolean useInterleavedFeatures()