Package com.yahoo.prelude
Class Index
java.lang.Object
com.yahoo.prelude.Index
Information about configured settings of a field or field collection (an actual index or not) in a search definition.
There are two types of settings:
- Typed commands are checked using a particular is/get method
- Untyped commands are checked using hasCommand and commandIterator
- Author:
- Steinar Knutsen, bratseth
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(String command) Adds a type or untyped command string to thisaliases()Returns an unmodifiable list of the aliases of this index (not including the index proper name)Returns all the literal command strings given as arguments to addCommand in this instanceReturns an iterator of all the untyped commands of thisbooleanReturns the string terminating an exact sequence in this index, or null to use the default (space)intReturns the gram size.booleanbooleangetName()Returns the canonical name of this index, unless it is the null index, which doesn't have a canonical namebooleanReturns true if the content of this index is normalizedbooleanlonglongcom.yahoo.language.process.StemModebooleanhasCommand(String commandString) Checks whether this has the given (exact) untyped command stringbooleanbooleanbooleanbooleanisExact()Returns whether this is an exact index, which should match tokens containing any charactersbooleanReturns true if this is an attribute with fastsearch turned onbooleanbooleanisIndex()booleanbooleanReturns whether terms in this field are lowercased when indexing.booleanReturns true if this is a multivalue fieldbooleanisNGram()Returns true if this is an ngram index (default: false)booleanisNull()Returns true if this is the null indexbooleanbooleanbooleanisString()booleanisTensor()booleanvoidsetAttribute(boolean isAttribute) voidsetDefaultPosition(boolean v) voidsetDynamicSummary(boolean dynamicSummary) voidSet whether this index should match any kind of charactersvoidsetFastSearch(boolean fastSearch) voidsetHighlightSummary(boolean highlightSummary) voidsetHostIndex(boolean hostIndex) voidsetIndex(boolean isIndex) voidsetInteger(boolean integer) voidsetLiteralBoost(boolean literalBoost) voidsetLowercase(boolean lowercase) Sets whether terms in this field are lowercased when indexing.voidsetMultivalue(boolean multivalue) voidsetNGram(boolean nGram, int gramSize) voidsetNormalize(boolean normalize) voidsetNumerical(boolean numerical) booleansetPhraseSegmenting(boolean phraseSegmenting) voidsetPlainTokens(boolean plainTokens) voidsetPredicate(boolean isPredicate) voidsetStemMode(com.yahoo.language.process.StemMode stemMode) voidsetStemMode(String name) voidsetString(boolean string) voidsetUriIndex(boolean uriIndex) toString()
-
Field Details
-
nullIndex
The null index - don't use this for name lookups
-
-
Constructor Details
-
Index
-
-
Method Details
-
addAlias
-
aliases
Returns an unmodifiable list of the aliases of this index (not including the index proper name) -
getName
Returns the canonical name of this index, unless it is the null index, which doesn't have a canonical name -
isUriIndex
public boolean isUriIndex() -
isDefaultPosition
public boolean isDefaultPosition() -
setDefaultPosition
public void setDefaultPosition(boolean v) -
setUriIndex
public void setUriIndex(boolean uriIndex) -
isHostIndex
public boolean isHostIndex() -
setHostIndex
public void setHostIndex(boolean hostIndex) -
getStemMode
public com.yahoo.language.process.StemMode getStemMode() -
setStemMode
public void setStemMode(com.yahoo.language.process.StemMode stemMode) -
setStemMode
-
addCommand
Adds a type or untyped command string to this -
isTensor
public boolean isTensor() -
setLowercase
public void setLowercase(boolean lowercase) Sets whether terms in this field are lowercased when indexing. -
isLowercase
public boolean isLowercase()Returns whether terms in this field are lowercased when indexing. -
commandIterator
Returns an iterator of all the untyped commands of this -
hasCommand
Checks whether this has the given (exact) untyped command string -
setExact
Set whether this index should match any kind of characters- Parameters:
exact- true to make this index match any kind of characters, not just word and digit onesterminator- the terminator of an exact sequence (one or more characters), or null to use the default (space)
-
isExact
public boolean isExact()Returns whether this is an exact index, which should match tokens containing any characters -
getExactTerminator
Returns the string terminating an exact sequence in this index, or null to use the default (space) -
isNGram
public boolean isNGram()Returns true if this is an ngram index (default: false) -
getGramSize
public int getGramSize()Returns the gram size. Only used if isNGram is true (default: 2) -
setNGram
public void setNGram(boolean nGram, int gramSize) -
setDynamicSummary
public void setDynamicSummary(boolean dynamicSummary) -
getDynamicSummary
public boolean getDynamicSummary() -
setHighlightSummary
public void setHighlightSummary(boolean highlightSummary) -
getHighlightSummary
public boolean getHighlightSummary() -
isNull
public boolean isNull()Returns true if this is the null index -
isAttribute
public boolean isAttribute() -
setAttribute
public void setAttribute(boolean isAttribute) -
isIndex
public boolean isIndex() -
setIndex
public void setIndex(boolean isIndex) -
hasPlainTokens
public boolean hasPlainTokens() -
setPlainTokens
public void setPlainTokens(boolean plainTokens) -
setMultivalue
public void setMultivalue(boolean multivalue) -
isMultivalue
public boolean isMultivalue()Returns true if this is a multivalue field -
setFastSearch
public void setFastSearch(boolean fastSearch) -
isFastSearch
public boolean isFastSearch()Returns true if this is an attribute with fastsearch turned on -
setNormalize
public void setNormalize(boolean normalize) -
getNormalize
public boolean getNormalize()Returns true if the content of this index is normalized -
getLiteralBoost
public boolean getLiteralBoost() -
setLiteralBoost
public void setLiteralBoost(boolean literalBoost) -
setNumerical
public void setNumerical(boolean numerical) -
isNumerical
public boolean isNumerical() -
setString
public void setString(boolean string) -
isString
public boolean isString() -
setInteger
public void setInteger(boolean integer) -
isInteger
public boolean isInteger() -
setPredicate
public void setPredicate(boolean isPredicate) -
isPredicate
public boolean isPredicate() -
getPredicateUpperBound
public long getPredicateUpperBound() -
getPredicateLowerBound
public long getPredicateLowerBound() -
getPhraseSegmenting
public boolean getPhraseSegmenting() -
setPhraseSegmenting
public boolean setPhraseSegmenting(boolean phraseSegmenting) -
allCommands
Returns all the literal command strings given as arguments to addCommand in this instance -
toString
-