public class Index extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Index.Attribute |
Modifier and Type | Field and Description |
---|---|
private Set<String> |
commands |
private boolean |
dynamicSummary |
private boolean |
exact
True if this is an exact index - which should match
tokens containing any characters
|
private String |
exactTerminator
The string terminating an exact token in this index,
or null to use the default (space)
|
private boolean |
fastSearch |
private int |
gramSize |
private boolean |
highlightSummary |
private boolean |
hostIndex |
private boolean |
isAttribute |
private boolean |
isDefaultPosition |
private boolean |
isNGram |
private boolean |
literalBoost |
private boolean |
lowercase |
private Index.Attribute[] |
matchGroup |
private boolean |
multivalue |
private String |
name |
private boolean |
normalize |
static Index |
nullIndex
The null index - don't use this for name lookups
|
private boolean |
numerical |
private boolean |
plainTokens |
private long |
predicateLowerBound |
private long |
predicateUpperBound |
private com.yahoo.language.process.StemMode |
stemMode |
private boolean |
uriIndex |
Modifier and Type | Method and Description |
---|---|
Index |
addCommand(String commandString)
Adds a type or untyped command string to this
|
Iterator<String> |
commandIterator()
Returns an iterator of all the untyped commands of this
|
boolean |
getDynamicSummary() |
String |
getExactTerminator()
Returns the string terminating an exact sequence in this index, or null to use the default (space)
|
int |
getGramSize()
Returns the gram size.
|
boolean |
getHighlightSummary() |
boolean |
getLiteralBoost() |
Index.Attribute[] |
getMatchGroup() |
String |
getName()
Returns the canonical name of this index, unless it
is the null index, which doesn't have a canonical name
|
boolean |
getNormalize()
Returns true if the content of this index is normalized
|
long |
getPredicateLowerBound() |
long |
getPredicateUpperBound() |
com.yahoo.language.process.StemMode |
getStemMode() |
boolean |
hasCommand(String commandString)
Checks whether this has the given (exact) untyped command string
|
boolean |
hasPlainTokens() |
boolean |
isAttribute() |
boolean |
isDefaultPosition() |
boolean |
isExact()
Returns whether this is an exact index, which should match tokens containing any characters
|
boolean |
isFastSearch()
Returns true if this is an attribute with fastsearch turned on
|
boolean |
isHostIndex() |
boolean |
isLowercase()
Whether terms in this field are lower cased when indexing.
|
boolean |
isMultivalue()
Returns true if this is a multivalue field
|
boolean |
isNGram()
Returns true if this is an ngram index (default: false)
|
boolean |
isNull()
Returns true if this is the null index
|
boolean |
isNumerical() |
boolean |
isUriIndex() |
void |
setAttribute(boolean isAttribute) |
void |
setDefaultPosition(boolean v) |
void |
setDynamicSummary(boolean dynamicSummary) |
void |
setExact(boolean exact,
String terminator)
Set whether this index should match any kind of characters
|
void |
setFastSearch(boolean fastSearch) |
void |
setHighlightSummary(boolean highlightSummary) |
void |
setHostIndex(boolean hostIndex) |
void |
setLiteralBoost(boolean literalBoost) |
void |
setLowercase(boolean lowercase)
Whether terms in this field are lower cased when indexing.
|
void |
setMatchGroup(String[] attributes) |
void |
setMultivalue(boolean multivalue) |
void |
setNGram(boolean nGram,
int gramSize) |
void |
setNormalize(boolean normalize) |
void |
setNumerical(boolean numerical) |
void |
setPlainTokens(boolean plainTokens) |
private void |
setPredicateBounds(String bounds) |
void |
setStemMode(com.yahoo.language.process.StemMode stemMode) |
void |
setStemMode(String name) |
void |
setUriIndex(boolean uriIndex) |
String |
toString() |
public static final Index nullIndex
private String name
private boolean uriIndex
private boolean hostIndex
private com.yahoo.language.process.StemMode stemMode
private Index.Attribute[] matchGroup
private boolean isAttribute
private boolean isDefaultPosition
private boolean dynamicSummary
private boolean highlightSummary
private boolean lowercase
private boolean plainTokens
private boolean multivalue
private boolean fastSearch
private boolean normalize
private boolean literalBoost
private boolean numerical
private long predicateUpperBound
private long predicateLowerBound
private boolean exact
private boolean isNGram
private int gramSize
private String exactTerminator
public Index(String name)
public String getName()
public boolean isUriIndex()
public boolean isDefaultPosition()
public void setDefaultPosition(boolean v)
public void setUriIndex(boolean uriIndex)
public boolean isHostIndex()
public void setHostIndex(boolean hostIndex)
public com.yahoo.language.process.StemMode getStemMode()
public void setStemMode(com.yahoo.language.process.StemMode stemMode)
public void setStemMode(String name)
public Index addCommand(String commandString)
private void setPredicateBounds(String bounds)
public void setLowercase(boolean lowercase)
lowercase
- true if terms are lowercasedpublic boolean isLowercase()
public Iterator<String> commandIterator()
public boolean hasCommand(String commandString)
public void setExact(boolean exact, String terminator)
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)public boolean isExact()
public String getExactTerminator()
public boolean isNGram()
public int getGramSize()
public void setNGram(boolean nGram, int gramSize)
public void setDynamicSummary(boolean dynamicSummary)
public boolean getDynamicSummary()
public void setHighlightSummary(boolean highlightSummary)
public boolean getHighlightSummary()
public boolean isNull()
public Index.Attribute[] getMatchGroup()
public void setMatchGroup(String[] attributes)
public boolean isAttribute()
public void setAttribute(boolean isAttribute)
public boolean hasPlainTokens()
public void setPlainTokens(boolean plainTokens)
public void setMultivalue(boolean multivalue)
public boolean isMultivalue()
public void setFastSearch(boolean fastSearch)
public boolean isFastSearch()
public void setNormalize(boolean normalize)
public boolean getNormalize()
public boolean getLiteralBoost()
public void setLiteralBoost(boolean literalBoost)
public void setNumerical(boolean numerical)
public boolean isNumerical()
public long getPredicateUpperBound()
public long getPredicateLowerBound()
Copyright © 2018. All rights reserved.