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 use case 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, 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.protected voidappendHeadingString(StringBuilder buffer) Appends the heading of this string.protected voidencodeThis(ByteBuffer buffer) Encodes just this item, not its regular subitems, to the given buffer.booleanReturns whether this item is of the same class and contains the same state as the given item.Return the enumerated type of this item.getName()Returns the name of this iteminthashCode()voidsetIndexName(String index) Sets the index name of all subitems of thisMethods inherited from class com.yahoo.prelude.query.NonReducibleCompositeItem
extractSingleChildMethods inherited from class com.yahoo.prelude.query.CompositeItem
acceptsItemsOfType, adding, addItem, addItem, clone, disclose, encode, encodingArity, ensureNotInSubtree, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, isLocked, items, lock, removeItem, removeItem, setItem, shouldParenthesizeMethods inherited from class com.yahoo.prelude.query.Item
addAnnotation, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hasPrefixMatchSemantics, 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:CompositeItemEncodes just this item, not its regular subitems, to the given buffer.- Overrides:
encodeThisin classCompositeItem
-
appendHeadingString
Description copied from class:ItemAppends the heading of this string. As default getName() followed by a space.- Overrides:
appendHeadingStringin classItem
-
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.- Overrides:
appendBodyStringin classCompositeItem
-
getItemType
Description copied from class:ItemReturn the enumerated type of this item.- Specified by:
getItemTypein classItem
-
getName
Description copied from class:ItemReturns the name of this item -
getFieldName
-
setIndexName
Description copied from class:CompositeItemSets the index name of all subitems of this- Overrides:
setIndexNamein classCompositeItem
-
equals
Description copied from class:CompositeItemReturns whether this item is of the same class and contains the same state as the given item.- Overrides:
equalsin classCompositeItem
-
hashCode
public int hashCode()- Overrides:
hashCodein classCompositeItem
-