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
A word item which only consists of a value and weight, and gets other properties
such as the index to query from ther parent item.
It's more efficient to use pure items where possible instead of
TermItem children (WordItem, IntItem)
which may carry many auxiliary properties.- 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, documentFrequency, explicitSignificance, significance, uniqueID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendBodyString(StringBuilder buffer) Override to append the item body in the canonical query language of this item.voidintencode(ByteBuffer buffer) getName()Returns the name of this itemvoidsetIndexName(String index) Ignored.Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendHeadingString, clone, encodeThis, equals, getAnnotation, getBytes, getCode, getCreator, getItemType, getLabel, getLanguage, getParent, getTermCount, getWeight, hasAnnotation, hasConnectivityBackLink, hashCode, hasPrefixMatchSemantics, hasUniqueID, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthesize, toString, usePositionData
-
Constructor Details
-
PureWeightedItem
public PureWeightedItem(int weight)
-
-
Method Details
-
setIndexName
Ignored.- Specified by:
setIndexNamein classItem
-
getName
Description copied from class:ItemReturns the name of this item -
encode
-
appendBodyString
Description copied from class:ItemOverride 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 by this method.- Specified by:
appendBodyStringin classItem
-
disclose
-