Class Index

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Index
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.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:
    Serialized Form
    • Constructor Detail

      • Index

        public Index​(java.lang.String name)
      • Index

        public Index​(java.lang.String name,
                     boolean prefix)
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
      • getName

        public java.lang.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​(Search search)
        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​(java.lang.String alias)
        Adds an alias to this index name
      • aliasIterator

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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

        public java.lang.Object clone()
        Makes a deep copy of this index
        Overrides:
        clone in class java.lang.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 java.util.Optional<HnswIndexParams> getHnswIndexParams()
      • setHnswIndexParams

        public void setHnswIndexParams​(HnswIndexParams params)
      • setInterleavedFeatures

        public void setInterleavedFeatures​(boolean value)
      • useInterleavedFeatures

        public boolean useInterleavedFeatures()