Package com.yahoo.search.query
Class Ranking
java.lang.Object
com.yahoo.search.query.Ranking
- All Implemented Interfaces:
Cloneable
The ranking (hit ordering) settings of a query
- Author:
- Arne Bergene Fossaa, bratseth
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final com.yahoo.processing.request.CompoundName
An alias for listing featuresstatic final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
static QueryProfileType
Returns the rank features of this, an empty container (never null) if none are set.Get the freshness search parameters associated with this querystatic Ranking
boolean
Returns whether rank features should be dumped with the result of this query, default falseReturns the location of this query, or null if noneReturns the matching settings of this.Returns the match phase rank settings of this.Returns the query owning this, never nullReturns the name of the rank profile to be used.Returns the rank properties of this, an empty container (never null) if none are set.boolean
Returns the rerank-count that will be used, or null if not setReturns the soft timeout settings of this.Returns the sorting spec of this query, or null if none is setint
hashCode()
boolean
Returns whether a rank profile has been explicitly set.void
prepare()
void
setFreshness
(Freshness freshness) void
setFreshness
(String dateTime) Set the freshness search parameters for this queryvoid
setListFeatures
(boolean listFeatures) Set whether rank features should be included with the result of this queryvoid
setLocation
(Location location) void
setLocation
(String str) Sets the location from a string, seeLocation
for syntaxvoid
setProfile
(String profile) Sets the name of the rank profile to use.void
setQueryCache
(boolean queryCache) Returns whether feature caching is turned on in the backed.void
setRerankCount
(int rerankCount) Sets the number of hits for which the second-phase function will be evaluated.void
setSorting
(Sorting sorting) Sets how this query should be sorted.void
setSorting
(String sortingString) Sets sorting from a string.
-
Field Details
-
RANKFEATURES
public static final com.yahoo.processing.request.CompoundName RANKFEATURESAn alias for listing features -
RANKING
- See Also:
-
LOCATION
- See Also:
-
PROFILE
- See Also:
-
SORTING
- See Also:
-
LIST_FEATURES
- See Also:
-
FRESHNESS
- See Also:
-
QUERYCACHE
- See Also:
-
RERANKCOUNT
- See Also:
-
MATCH_PHASE
- See Also:
-
DIVERSITY
- See Also:
-
SOFTTIMEOUT
- See Also:
-
MATCHING
- See Also:
-
FEATURES
- See Also:
-
PROPERTIES
- See Also:
-
-
Constructor Details
-
Ranking
-
-
Method Details
-
getArgumentType
-
hasRankProfile
public boolean hasRankProfile()Returns whether a rank profile has been explicitly set. This is only used in serializing the packet properly to FS4. -
getFreshness
Get the freshness search parameters associated with this query -
setFreshness
Set the freshness search parameters for this query -
setFreshness
-
setQueryCache
public void setQueryCache(boolean queryCache) Returns whether feature caching is turned on in the backed. Feature caching allows us to avoid sending the query during document summary retrieval and recalculate feature scores, it is typically beneficial to turn it on if fan-out is low or queries are large.Default is false (off).
-
getQueryCache
public boolean getQueryCache() -
setRerankCount
public void setRerankCount(int rerankCount) Sets the number of hits for which the second-phase function will be evaluated. When set, this overrides the setting in the rank profile. -
getRerankCount
Returns the rerank-count that will be used, or null if not set -
getLocation
Returns the location of this query, or null if none -
setLocation
-
setLocation
Sets the location from a string, seeLocation
for syntax -
getProfile
Returns the name of the rank profile to be used. Returns "default" if nothing is set. -
setProfile
Sets the name of the rank profile to use. This cannot be set to null. -
getFeatures
Returns the rank features of this, an empty container (never null) if none are set. The returned object can be modified directly to change the rank properties of this. -
getProperties
Returns the rank properties of this, an empty container (never null) if none are set. The returned object can be modified directly to change the rank properties of this. -
setListFeatures
public void setListFeatures(boolean listFeatures) Set whether rank features should be included with the result of this query -
getListFeatures
public boolean getListFeatures()Returns whether rank features should be dumped with the result of this query, default false -
getMatchPhase
Returns the match phase rank settings of this. This is never null. -
getMatching
Returns the matching settings of this. This is never null. -
getSoftTimeout
Returns the soft timeout settings of this. This is never null. -
getSorting
Returns the sorting spec of this query, or null if none is set -
setSorting
Sets how this query should be sorted. Set to null to turn off explicit sorting. -
setSorting
Sets sorting from a string. SeeSorting
on syntax -
getFrom
-
prepare
public void prepare() -
getParent
Returns the query owning this, never null -
clone
-
cloneFor
-
equals
-
hashCode
public int hashCode()
-