Package com.yahoo.searchdefinition
Class Index
- java.lang.Object
-
- com.yahoo.searchdefinition.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Index.Type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlias(java.lang.String alias)
Adds an alias to this index namejava.util.Iterator<java.lang.String>
aliasIterator()
Returns a read-only iterator of the aliases (Strings) to this index namejava.lang.Object
clone()
Makes a deep copy of this indexIndex
copy()
boolean
equals(java.lang.Object o)
BooleanIndexDefinition
getBooleanIndexDefiniton()
Returns the boolean index definitionjava.util.Optional<HnswIndexParams>
getHnswIndexParams()
java.lang.String
getName()
RankType
getRankType()
Returns the rank type of this field, or null if nothing is setStemming
getStemming()
Return the stemming setting of this index, may be nullStemming
getStemming(Search search)
Whether this field should be stemmed in this search definition, this is never nullIndex.Type
getType()
Returns the index engine typeint
hashCode()
boolean
isPrefix()
Returns whether this index supports prefix search, default is falsevoid
setBooleanIndexDefiniton(BooleanIndexDefinition def)
Sets the boolean index definitionvoid
setHnswIndexParams(HnswIndexParams params)
void
setInterleavedFeatures(boolean value)
void
setName(java.lang.String name)
void
setPrefix(boolean prefix)
Sets whether this index supports prefix searchvoid
setRankType(RankType rankType)
Sets the rank type of this fieldvoid
setStemming(Stemming stemming)
Sets how this field should be stemmed, or set to null to use the default.void
setType(Index.Type type)
Sets the index engine typejava.lang.String
toString()
boolean
useInterleavedFeatures()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
clone
public java.lang.Object clone()
Makes a deep copy of this index- Overrides:
clone
in classjava.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()
-
-