Package com.yahoo.prelude.query
Class NonReducibleCompositeItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.CompositeItem
-
- com.yahoo.prelude.query.NonReducibleCompositeItem
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
SameElementItem
,WeakAndItem
public abstract class NonReducibleCompositeItem extends CompositeItem
A composite item which specifies semantics which are not maintained if an instance with a single child is replaced by the single child. Most composites, like AND and OR, are reducible as e.g (AND a) is semantically equal to (a). This type functions as a marker type for query rewriters.- Author:
- bratseth
-
-
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 NonReducibleCompositeItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Item>
extractSingleChild()
Returns the single child of this, if this can be omitted without changes to recall semantics.-
Methods inherited from class com.yahoo.prelude.query.CompositeItem
adding, addItem, addItem, appendBodyString, clone, disclose, encode, encodeThis, encodingArity, ensureNotInSubtree, equals, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, hashCode, isLocked, items, lock, removeItem, removeItem, setIndexName, setItem, shouldParenthesize
-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendHeadingString, getAnnotation, getBytes, getCode, getCreator, getItemType, getLabel, getLanguage, getName, 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
-
-
-
-
Method Detail
-
extractSingleChild
public Optional<Item> extractSingleChild()
Description copied from class:CompositeItem
Returns the single child of this, if this can be omitted without changes to recall semantics.- Overrides:
extractSingleChild
in classCompositeItem
-
-