Package com.yahoo.prelude.query
Class SimpleIndexedItem
java.lang.Object
com.yahoo.prelude.query.Item
com.yahoo.prelude.query.SimpleTaggableItem
com.yahoo.prelude.query.SimpleIndexedItem
- All Implemented Interfaces:
HasIndexItem,IndexedItem,TaggableItem,Cloneable
- Direct Known Subclasses:
TermItem
Common implementation for Item classes implementing the IndexedItem interface.
Note that this file exist in 3 copies that should be kept in sync:
CompositeIndexedItem.java
SimpleIndexedItem.java
IndexedSegmentItem.java
These should only have trivial differences.
(multiple inheritance or mixins would have been nice).
- Author:
- arnej27959
-
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 voidappendIndexString(StringBuilder buffer) Appends the index prefix if necessaryvoidprotected voidencodeThis(ByteBuffer buffer) booleanReturns whether this item is of the same class and contains the same state as the given item.The *full* name of the field searched by this, which is prefixed by the parent name and a dot if this is inside a SameElement, and the same as getIndexName otherwise.abstract StringReturn the searchable term contents of this item.The name of the index this belongs to, or "" (never null) if not specifiedinthashCode()voidsetIndexName(String index) Sets the name of the index to searchMethods inherited from class com.yahoo.prelude.query.SimpleTaggableItem
getConnectedItem, getConnectivity, getDocumentFrequency, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setDocumentFrequency, setExplicitSignificance, setSignificance, setUniqueIDMethods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendBodyString, appendHeadingString, clone, encode, getAnnotation, getBytes, getCode, getCreator, getItemType, getLabel, getLanguage, getName, getParent, getTermCount, getWeight, hasAnnotation, hasConnectivityBackLink, hasPrefixMatchSemantics, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthesize, toString, usePositionDataMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.yahoo.prelude.query.HasIndexItem
getNumWords
-
Constructor Details
-
SimpleIndexedItem
public SimpleIndexedItem()
-
-
Method Details
-
getIndexName
The name of the index this belongs to, or "" (never null) if not specified- Specified by:
getIndexNamein interfaceHasIndexItem
-
getFieldName
The *full* name of the field searched by this, which is prefixed by the parent name and a dot if this is inside a SameElement, and the same as getIndexName otherwise. -
encodeThis
- Overrides:
encodeThisin classItem
-
setIndexName
Sets the name of the index to search- Specified by:
setIndexNamein interfaceIndexedItem- Specified by:
setIndexNamein classItem
-
appendIndexString
Appends the index prefix if necessary -
equals
Description copied from class:ItemReturns whether this item is of the same class and contains the same state as the given item. -
hashCode
public int hashCode() -
getIndexedString
Description copied from interface:IndexedItemReturn the searchable term contents of this item.- Specified by:
getIndexedStringin interfaceIndexedItem- Returns:
- a string representation of what is presumably stored in an index which will match this item
-
disclose
-