Package com.yahoo.prelude.query
Class GeoLocationItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.SimpleTaggableItem
-
- com.yahoo.prelude.query.SimpleIndexedItem
-
- com.yahoo.prelude.query.TermItem
-
- com.yahoo.prelude.query.GeoLocationItem
-
- All Implemented Interfaces:
BlockItem
,HasIndexItem
,IndexedItem
,TaggableItem
,Cloneable
public class GeoLocationItem extends TermItem
This represents a geo-location in the query tree. Used for closeness(fieldname) and distance(fieldname) rank features.- Author:
- arnej
-
-
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 GeoLocationItem(Location location)
Construct from a Location, which must be geo circle with an attribute set.GeoLocationItem(Location location, String fieldName)
Construct from a Location and a field name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoLocationItem
clone()
Returns a deep copy of this itemprotected void
encodeThis(ByteBuffer buffer)
boolean
equals(Object object)
Returns whether this item is of the same class and contains the same state as the given item.String
getIndexedString()
Return the searchable term contents of this item.Item.ItemType
getItemType()
Return the enumerated type of this item.Location
getLocation()
String
getName()
Returns the name of this itemint
getNumWords()
Returns how many phrase words does this item containString
getRawWord()
Returns the raw form of the text leading to this term, exactly as received, including original casingint
hashCode()
boolean
isStemmed()
boolean
isWords()
Returns whether this item represents normal textvoid
setValue(String value)
Sets the value of this item from a string.String
stringValue()
Returns the value of this term as a string-
Methods inherited from class com.yahoo.prelude.query.TermItem
appendBodyString, disclose, encode, getOrigin, getSegmentingRule, getTermCount, isFromQuery, isNormalizable, setFromQuery, setNormalizable, setOrigin, setSegmentingRule
-
Methods inherited from class com.yahoo.prelude.query.SimpleIndexedItem
appendIndexString, getIndexName, setIndexName
-
Methods inherited from class com.yahoo.prelude.query.SimpleTaggableItem
getConnectedItem, getConnectivity, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setExplicitSignificance, setSignificance, setUniqueID
-
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, shouldParenthesize, toString, usePositionData
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.yahoo.prelude.query.HasIndexItem
getIndexName
-
-
-
-
Constructor Detail
-
GeoLocationItem
public GeoLocationItem(Location location)
Construct from a Location, which must be geo circle with an attribute set.
-
-
Method Detail
-
getLocation
public Location getLocation()
-
getRawWord
public String getRawWord()
Description copied from class:TermItem
Returns the raw form of the text leading to this term, exactly as received, including original casing- Specified by:
getRawWord
in interfaceBlockItem
- Specified by:
getRawWord
in classTermItem
-
getItemType
public Item.ItemType getItemType()
Description copied from class:Item
Return the enumerated type of this item.- Specified by:
getItemType
in classItem
-
stringValue
public String stringValue()
Description copied from interface:BlockItem
Returns the value of this term as a string
-
setValue
public void setValue(String value)
Description copied from class:TermItem
Sets the value of this item from a string.
-
equals
public boolean equals(Object object)
Description copied from class:Item
Returns whether this item is of the same class and contains the same state as the given item.
-
clone
public GeoLocationItem clone()
Description copied from class:Item
Returns a deep copy of this item
-
getIndexedString
public String getIndexedString()
Description copied from interface:IndexedItem
Return the searchable term contents of this item.- Specified by:
getIndexedString
in interfaceIndexedItem
- Specified by:
getIndexedString
in classSimpleIndexedItem
- Returns:
- a string representation of what is presumably stored in an index which will match this item
-
encodeThis
protected void encodeThis(ByteBuffer buffer)
- Overrides:
encodeThis
in classSimpleIndexedItem
-
getNumWords
public int getNumWords()
Description copied from interface:HasIndexItem
Returns how many phrase words does this item contain
-
isStemmed
public boolean isStemmed()
-
-