Package com.yahoo.search.query.ranking
Class MatchPhase
java.lang.Object
com.yahoo.search.query.ranking.MatchPhase
- All Implemented Interfaces:
Cloneable
The match phase ranking settings of this query.
These are the same settings for match phase that can be set in a rank profile
and is used for achieving reasonable query behavior given a query which causes too many matches:
The engine will fall back to retrieving the best values according to the attribute given here
during matching.
For this feature to work well, the order given by the attribute should correlate reasonably with the order of results produced if full evaluation is performed.
- Author:
- bratseth
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
static QueryProfileType
boolean
Returns the order to sort the attribute during the path phase when this takes effect.Returns the attribute to use for degradation, or null if noneReturns the max hits to aim for producing in the match phase on each content node, or null if not setint
hashCode()
void
prepare
(RankProperties rankProperties) Internal operation - DO NOT USEvoid
setAscending
(boolean ascending) Set to true to sort by the attribute in ascending order when this is in use during the match phase, false (default) to use descending order.void
setAttribute
(String attribute) Sets the attribute field which will be used to decide the best matches after it has been determined during matching that this query is going to cause too many matches.void
setDiversity
(Diversity diversity) void
setMaxFilterCoverage
(double maxFilterCoverage) void
setMaxHits
(long maxHits) Sets the max hits to aim for producing in the match phase.
-
Field Details
-
ATTRIBUTE
- See Also:
-
ASCENDING
- See Also:
-
MAX_HITS
- See Also:
-
MAX_FILTER_COVERAGE
- See Also:
-
-
Constructor Details
-
MatchPhase
public MatchPhase()
-
-
Method Details
-
getArgumentType
-
setAttribute
Sets the attribute field which will be used to decide the best matches after it has been determined during matching that this query is going to cause too many matches. Set to null (default) to disable degradation.If this is set, make sure to also set the maxHits value. Otherwise, the attribute setting is ignored.
This attribute should have fast-search turned on.
-
getAttribute
Returns the attribute to use for degradation, or null if none -
setAscending
public void setAscending(boolean ascending) Set to true to sort by the attribute in ascending order when this is in use during the match phase, false (default) to use descending order. -
getAscending
public boolean getAscending()Returns the order to sort the attribute during the path phase when this takes effect. -
setMaxHits
public void setMaxHits(long maxHits) Sets the max hits to aim for producing in the match phase. This must be set if an attribute value is set. It should be set to a reasonable fraction of the total documents on each partition. -
setMaxFilterCoverage
public void setMaxFilterCoverage(double maxFilterCoverage) -
getMaxHits
Returns the max hits to aim for producing in the match phase on each content node, or null if not set -
getMaxFilterCoverage
-
getDiversity
-
setDiversity
-
prepare
Internal operation - DO NOT USE -
hashCode
public int hashCode() -
equals
-
clone
-