Package com.yahoo.prelude.query
Class EquivItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.CompositeItem
-
- com.yahoo.prelude.query.CompositeTaggableItem
-
- com.yahoo.prelude.query.EquivItem
-
- All Implemented Interfaces:
TaggableItem
,java.lang.Cloneable
public class EquivItem extends CompositeTaggableItem
An Item where each child is an alternative which can be matched. Produces the same recall as Or, but differs in that the relevance of a match does not increase if more than one children is matched: With Equiv, matching one child perfectly is a perfect match.This can only have Word, WordAlternatives, Exact, Int or Phrase children.
- Author:
- havardpe
-
-
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 EquivItem()
Makes an EQUIV item with no childrenEquivItem(Item item)
Creates an EQUIV with the given item as child.EquivItem(Item item, java.util.Collection<java.lang.String> words)
Creates an EQUIV with the given item and a set of alternate words as children.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
adding(Item item)
Item.ItemType
getItemType()
Return the enumerated type of this item.java.lang.String
getName()
Returns the name of this item-
Methods inherited from class com.yahoo.prelude.query.CompositeTaggableItem
getConnectedItem, getConnectivity, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setExplicitSignificance, setSignificance, setUniqueID
-
Methods inherited from class com.yahoo.prelude.query.CompositeItem
addItem, addItem, appendBodyString, clone, disclose, encode, encodeThis, encodingArity, ensureNotInSubtree, equals, extractSingleChild, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, hashCode, isLocked, items, lock, removeItem, removeItem, setIndexName, setItem, shouldParenthize
-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendHeadingString, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, toString, usePositionData
-
-
-
-
Constructor Detail
-
EquivItem
public EquivItem()
Makes an EQUIV item with no children
-
EquivItem
public EquivItem(Item item)
Creates an EQUIV with the given item as child. The new EQUIV will take connectivity, significance and weight from the given item.- Parameters:
item
- will be modified and added as a child
-
EquivItem
public EquivItem(Item item, java.util.Collection<java.lang.String> words)
Creates an EQUIV with the given item and a set of alternate words as children. The new EQUIV will take connectivity, significance and weight from the given item.- Parameters:
item
- will be modified and added as a childwords
- set of words to create WordItems from
-
-
Method Detail
-
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
-
adding
protected void adding(Item item)
- Overrides:
adding
in classCompositeItem
-
-