Package com.yahoo.prelude.query
Class SameElementItem
java.lang.Object
com.yahoo.prelude.query.Item
com.yahoo.prelude.query.CompositeItem
com.yahoo.prelude.query.NonReducibleCompositeItem
com.yahoo.prelude.query.SameElementItem
- All Implemented Interfaces:
Cloneable
This represents a query where all terms are required to match in the same element id.
The primary usecase is to allow efficient search in arrays and maps of struct.
The common path is the field name containing the struct.
- 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
appendBodyString
(StringBuilder buffer) Override to append the item body in the canonical query language of this item.protected void
appendHeadingString
(StringBuilder buffer) Appends the heading of this string.protected void
encodeThis
(ByteBuffer buffer) Encodes just this item, not its regular subitems, to the given buffer.boolean
Returns whether this item is of the same class and contains the same state as the given item.Returns the single child of this, if this can be omitted without changes to recall semantics.Return the enumerated type of this item.getName()
Returns the name of this itemint
hashCode()
Methods inherited from class com.yahoo.prelude.query.CompositeItem
addItem, addItem, clone, disclose, encode, encodingArity, ensureNotInSubtree, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, isLocked, items, lock, removeItem, removeItem, setIndexName, setItem, shouldParenthesize
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
-
Constructor Details
-
SameElementItem
-
-
Method Details
-
encodeThis
Description copied from class:CompositeItem
Encodes just this item, not its regular subitems, to the given buffer.- Overrides:
encodeThis
in classCompositeItem
-
appendHeadingString
Description copied from class:Item
Appends the heading of this string. As default getName() followed by a space.- Overrides:
appendHeadingString
in classItem
-
appendBodyString
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.- Overrides:
appendBodyString
in classCompositeItem
-
adding
- Overrides:
adding
in classCompositeItem
-
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 classNonReducibleCompositeItem
-
getItemType
Description copied from class:Item
Return the enumerated type of this item.- Specified by:
getItemType
in classItem
-
getName
Description copied from class:Item
Returns the name of this item -
getFieldName
-
equals
Description copied from class:CompositeItem
Returns whether this item is of the same class and contains the same state as the given item.- Overrides:
equals
in classCompositeItem
-
hashCode
public int hashCode()- Overrides:
hashCode
in classCompositeItem
-