Package com.yahoo.prelude.query
Class NearItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.CompositeItem
-
- com.yahoo.prelude.query.NearItem
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ONearItem
public class NearItem extends CompositeItem
A set of terms which must be near each other to match.- Author:
- bratseth, havardpe
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.query.Item
Item.ItemCreator, Item.ItemType
-
-
Field Summary
Fields Modifier and Type Field Description static int
defaultDistance
The default distance used if none is specified: 2protected int
distance
-
Fields inherited from class com.yahoo.prelude.query.Item
connectedBacklink, connectedItem, connectivity, DEFAULT_WEIGHT, explicitSignificance, significance, uniqueID
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendHeadingString(StringBuilder buffer)
Appends the heading of this string -[getName()]([limit])
void
disclose(Discloser discloser)
protected void
encodeThis(ByteBuffer buffer)
Encodes just this item, not its regular subitems, to the given buffer.boolean
equals(Object object)
Returns whether this item is of the same class and contains the same state as the given item.int
getDistance()
Item.ItemType
getItemType()
Return the enumerated type of this item.String
getName()
Returns the name of this itemint
hashCode()
void
setDistance(int distance)
-
Methods inherited from class com.yahoo.prelude.query.CompositeItem
adding, addItem, addItem, appendBodyString, clone, encode, encodingArity, ensureNotInSubtree, extractSingleChild, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, isLocked, items, lock, removeItem, removeItem, setIndexName, setItem, shouldParenthize
-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hasUniqueID, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, toString, usePositionData
-
-
-
-
Field Detail
-
distance
protected int distance
-
defaultDistance
public static final int defaultDistance
The default distance used if none is specified: 2- See Also:
- Constant Field Values
-
-
Method Detail
-
setDistance
public void setDistance(int distance)
-
getDistance
public int getDistance()
-
getItemType
public Item.ItemType getItemType()
Description copied from class:Item
Return the enumerated type of this item.- Specified by:
getItemType
in classItem
-
encodeThis
protected void encodeThis(ByteBuffer buffer)
Description copied from class:CompositeItem
Encodes just this item, not its regular subitems, to the given buffer.- Overrides:
encodeThis
in classCompositeItem
-
disclose
public void disclose(Discloser discloser)
- Overrides:
disclose
in classCompositeItem
-
appendHeadingString
protected void appendHeadingString(StringBuilder buffer)
Appends the heading of this string -[getName()]([limit])
- Overrides:
appendHeadingString
in classItem
-
equals
public boolean equals(Object object)
Description copied from class:CompositeItem
Returns whether this item is of the same class and contains the same state as the given item.- Overrides:
equals
in classCompositeItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCompositeItem
-
-