Package com.yahoo.prelude.query
Class PureWeightedItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.PureWeightedItem
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
PureWeightedInteger
,PureWeightedString
public abstract class PureWeightedItem extends Item
An item which cannot provide its own index (field) name, but will always query the index specified by the parent item it is added to. It's more efficient to use pure items where possible instead ofTermItem
children (WordItem
,IntItem
) who each carry their own index name.- Author:
- baldersheim
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.query.Item
Item.ItemCreator, Item.ItemType
-
-
Field Summary
-
Fields inherited from class com.yahoo.prelude.query.Item
connectedBacklink, connectedItem, connectivity, DEFAULT_WEIGHT, explicitSignificance, significance, uniqueID
-
-
Constructor Summary
Constructors Constructor Description PureWeightedItem(int weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendBodyString(StringBuilder buffer)
Override to append the item body in the canonical query language of this item.int
encode(ByteBuffer buffer)
String
getName()
Returns the name of this itemvoid
setIndexName(String index)
Ignored.-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendHeadingString, clone, disclose, encodeThis, equals, getAnnotation, getBytes, getCode, getCreator, getItemType, getLabel, getLanguage, getParent, getTermCount, getWeight, hasAnnotation, hasConnectivityBackLink, hashCode, hasUniqueID, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthize, toString, usePositionData
-
-
-
-
Method Detail
-
setIndexName
public void setIndexName(String index)
Ignored.- Specified by:
setIndexName
in classItem
-
encode
public int encode(ByteBuffer buffer)
-
appendBodyString
protected void appendBodyString(StringBuilder buffer)
Description copied from class:Item
Override to append the item body in the canonical query language of this item. An item is usually represented by the string([itemName] [body])
The body must be appended appended by this method.- Specified by:
appendBodyString
in classItem
-
-