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:
java.lang.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(java.lang.StringBuilder buffer)
Appends the heading of this string -[getName()]([limit])
void
disclose(com.yahoo.prelude.query.textualrepresentation.Discloser discloser)
protected void
encodeThis(java.nio.ByteBuffer buffer)
Encodes just this item, not it's usual subitems, to the given buffer.boolean
equals(java.lang.Object object)
Returns whether this item is of the same class and contains the same state as the given itemint
getDistance()
Item.ItemType
getItemType()
Return the enumerated type of this item.java.lang.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
-
getName
public java.lang.String getName()
Description copied from class:Item
Returns the name of this item
-
encodeThis
protected void encodeThis(java.nio.ByteBuffer buffer)
Description copied from class:CompositeItem
Encodes just this item, not it's usual subitems, to the given buffer.- Overrides:
encodeThis
in classCompositeItem
-
disclose
public void disclose(com.yahoo.prelude.query.textualrepresentation.Discloser discloser)
- Overrides:
disclose
in classCompositeItem
-
appendHeadingString
protected void appendHeadingString(java.lang.StringBuilder buffer)
Appends the heading of this string -[getName()]([limit])
- Overrides:
appendHeadingString
in classItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCompositeItem
-
equals
public boolean equals(java.lang.Object object)
Returns whether this item is of the same class and contains the same state as the given item- Overrides:
equals
in classCompositeItem
-
-