Package com.yahoo.prelude.query
Class RangeItem
- All Implemented Interfaces:
BlockItem
,HasIndexItem
,IndexedItem
,TaggableItem
,Cloneable
This class represents a numeric range. You can also specify the number of hits you want this range to produce,
which can be used to create more efficient searches.
Note that '0' as hit limit means all hits matching the range criterion will be a match,
while positive numbers start from 'from' working
its way towards 'to' until it has reached its limit or range is exhausted. Negative number means that it will start
from 'to' and work its way towards 'from'.
- Author:
- baldersheim, 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, documentFrequency, explicitSignificance, significance, uniqueID
-
Constructor Summary
ConstructorDescriptionCreates a new range operatorCreates a new range operatorCreates a new range operatorCreates a new range operator -
Method Summary
Methods inherited from class com.yahoo.prelude.query.IntItem
appendHeadingString, encodeThis, equals, from, getEncodedInt, getFromLimit, getHitLimit, getIndexedString, getItemType, getName, getNumber, getNumWords, getRawWord, getToLimit, hashCode, isStemmed, isWords, setHitLimit, setNumber, setValue, stringValue
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, getDocumentFrequency, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setDocumentFrequency, setExplicitSignificance, setSignificance, setUniqueID
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, clone, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hasPrefixMatchSemantics, 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 Details
-
RangeItem
Creates a new range operator- Parameters:
from
- inclusive start point for rangeto
- inclusive end point for rangeindexName
- the index to search for this range
-
RangeItem
Creates a new range operator- Parameters:
from
- start point for rangeto
- end point for rangeindexName
- the index to search for this range
-
RangeItem
Creates a new range operator- Parameters:
from
- inclusive start point for rangeto
- inclusive end point for rangeindexName
- the index to search for this rangeisFromQuery
- Indicate if this stems directly from the user given query, or if you have constructed it at will.
-
RangeItem
Creates a new range operator- Parameters:
from
- start point for rangeto
- end point for rangeindexName
- the index to search for this rangeisFromQuery
- Indicate if this stems directly from the user given query, or if you have constructed it at will.
-
RangeItem
- Parameters:
from
- inclusive start point for rangeto
- inclusive end point for rangehitLimit
- This tells how many results you want included from this range as a minimum. You might get less if there are not enough, or you might get more. It will use the dictionary and include enough entries to satisfy your request. Positive number will start from left (@from) and work right. Negative number will start from right and work its way left. 0 means no limit.indexName
- the index to search for this rangeisFromQuery
- Indicate if this stems directly from the user given query, or if you have constructed it at will.
-
RangeItem
- Parameters:
from
- start point for rangeto
- end point for rangehitLimit
- This tells how many results you want included from this range as a minimum. You might get less if there are not enough, or you might get more. It will use the dictionary and include enough entries to satisfy your request. Positive number will start from left (@from) and work right. Negative number will start from right and work its way left. 0 means no limit.indexName
- the index to search for this rangeisFromQuery
- Indicate if this stems directly from the user given query, or if you have constructed it at will.
-
-
Method Details
-
getFrom
Returns the lower limit of this range, which may be negative infinity -
getTo
Returns the upper limit of this range, which may be positive infinity
-