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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final com.yahoo.processing.request.CompoundNameAn alias for listing featuresstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic QueryProfileTypeReturns the rank features of this, an empty container (never null) if none are set.Get the freshness search parameters associated with this querystatic RankingReturns the global-phase rank settings of this.Returns the keep-rank-count that will be used, or null if not setbooleanReturns 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.booleanReturns the rank-score-drop-limit that will be used, or null if not setReturns the rerank-count that will be used, or null if not setReturn the second-phase rank settings of this.Returns the significance settings of this.Returns the soft timeout settings of this.Returns the sorting spec of this query, or null if none is setinthashCode()booleanReturns whether a rank profile has been explicitly set.voidprepare()voidsetFreshness(Freshness freshness) voidsetFreshness(String dateTime) Set the freshness search parameters for this queryvoidsetKeepRankCount(int keepRankCount) Sets the keep-rank-count that will be used, or null if not setvoidsetListFeatures(boolean listFeatures) Set whether rank features should be included with the result of this queryvoidsetLocation(Location location) voidsetLocation(String str) Sets the location from a string, seeLocationfor syntaxvoidsetProfile(String profile) Sets the name of the rank profile to use.voidsetQueryCache(boolean queryCache) Returns whether feature caching is turned on in the backed.voidsetRankScoreDropLimit(double rankScoreDropLimit) Sets the rank-score-drop-limit that will be used, or null if not setvoidsetRerankCount(int rerankCount) Sets the number of hits for which the second-phase function will be evaluated.voidsetSorting(Sorting sorting) Sets how this query should be sorted.voidsetSorting(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:
-
KEEPRANKCOUNT
- See Also:
-
RANKSCOREDROPLIMIT
- See Also:
-
MATCH_PHASE
- See Also:
-
SECOND_PHASE
- See Also:
-
GLOBAL_PHASE
- See Also:
-
DIVERSITY
- See Also:
-
SIGNIFICANCE
- 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 -
setKeepRankCount
public void setKeepRankCount(int keepRankCount) Sets the keep-rank-count that will be used, or null if not set -
getKeepRankCount
Returns the keep-rank-count that will be used, or null if not set -
setRankScoreDropLimit
public void setRankScoreDropLimit(double rankScoreDropLimit) Sets the rank-score-drop-limit that will be used, or null if not set -
getRankScoreDropLimit
Returns the rank-score-drop-limit 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, seeLocationfor 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. -
getSecondPhase
Return the second-phase rank settings of this. This is never null. -
getGlobalPhase
Returns the global-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. -
getSignificance
Returns the significance 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. SeeSortingon syntax -
getFrom
-
prepare
public void prepare() -
getParent
Returns the query owning this, never null -
clone
-
cloneFor
-
equals
-
hashCode
public int hashCode()
-