Package com.yahoo.search.query
Class Ranking
- java.lang.Object
-
- com.yahoo.search.query.Ranking
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIVERSITY
static String
FEATURES
static String
FRESHNESS
static String
LIST_FEATURES
static String
LOCATION
static String
MATCH_PHASE
static String
MATCHING
static String
PROFILE
static String
PROPERTIES
static String
QUERYCACHE
static com.yahoo.processing.request.CompoundName
RANKFEATURES
An alias for listing featuresstatic String
RANKING
static String
RERANKCOUNT
static String
SOFTTIMEOUT
static String
SORTING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
boolean
equals(Object o)
static QueryProfileType
getArgumentType()
RankFeatures
getFeatures()
Returns the rank features of this, an empty container (never null) if none are set.Freshness
getFreshness()
Get the freshness search parameters associated with this querystatic Ranking
getFrom(Query q)
boolean
getListFeatures()
Returns whether rank features should be dumped with the result of this query, default falseLocation
getLocation()
Returns the location of this query, or null if noneMatching
getMatching()
Returns the matching settings of this.MatchPhase
getMatchPhase()
Returns the match phase rank settings of this.String
getProfile()
Returns the name of the rank profile to be used.RankProperties
getProperties()
Returns the rank properties of this, an empty container (never null) if none are set.boolean
getQueryCache()
Integer
getRerankCount()
Returns the rerank-count that will be used, or null if not setSoftTimeout
getSoftTimeout()
Returns the soft timeout settings of this.Sorting
getSorting()
Returns the sorting spec of this query, or null if none is setint
hashCode()
boolean
hasRankProfile()
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 Detail
-
RANKFEATURES
public static final com.yahoo.processing.request.CompoundName RANKFEATURES
An alias for listing features
-
RANKING
public static final String RANKING
- See Also:
- Constant Field Values
-
LOCATION
public static final String LOCATION
- See Also:
- Constant Field Values
-
PROFILE
public static final String PROFILE
- See Also:
- Constant Field Values
-
SORTING
public static final String SORTING
- See Also:
- Constant Field Values
-
LIST_FEATURES
public static final String LIST_FEATURES
- See Also:
- Constant Field Values
-
FRESHNESS
public static final String FRESHNESS
- See Also:
- Constant Field Values
-
QUERYCACHE
public static final String QUERYCACHE
- See Also:
- Constant Field Values
-
RERANKCOUNT
public static final String RERANKCOUNT
- See Also:
- Constant Field Values
-
MATCH_PHASE
public static final String MATCH_PHASE
- See Also:
- Constant Field Values
-
DIVERSITY
public static final String DIVERSITY
- See Also:
- Constant Field Values
-
SOFTTIMEOUT
public static final String SOFTTIMEOUT
- See Also:
- Constant Field Values
-
MATCHING
public static final String MATCHING
- See Also:
- Constant Field Values
-
FEATURES
public static final String FEATURES
- See Also:
- Constant Field Values
-
PROPERTIES
public static final String PROPERTIES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Ranking
public Ranking(Query parent)
-
-
Method Detail
-
getArgumentType
public static QueryProfileType 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
public Freshness getFreshness()
Get the freshness search parameters associated with this query
-
setFreshness
public void setFreshness(String dateTime)
Set the freshness search parameters for this query
-
setFreshness
public void setFreshness(Freshness freshness)
-
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
public Integer getRerankCount()
Returns the rerank-count that will be used, or null if not set
-
getLocation
public Location getLocation()
Returns the location of this query, or null if none
-
setLocation
public void setLocation(Location location)
-
setLocation
public void setLocation(String str)
Sets the location from a string, seeLocation
for syntax
-
getProfile
public String getProfile()
Returns the name of the rank profile to be used. Returns "default" if nothing is set.
-
setProfile
public void setProfile(String profile)
Sets the name of the rank profile to use. This cannot be set to null.
-
getFeatures
public RankFeatures 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
public RankProperties 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
public MatchPhase getMatchPhase()
Returns the match phase rank settings of this. This is never null.
-
getMatching
public Matching getMatching()
Returns the matching settings of this. This is never null.
-
getSoftTimeout
public SoftTimeout getSoftTimeout()
Returns the soft timeout settings of this. This is never null.
-
getSorting
public Sorting getSorting()
Returns the sorting spec of this query, or null if none is set
-
setSorting
public void setSorting(Sorting sorting)
Sets how this query should be sorted. Set to null to turn off explicit sorting.
-
setSorting
public void setSorting(String sortingString)
Sets sorting from a string. SeeSorting
on syntax
-
prepare
public void prepare()
-
-