Package com.yahoo.search.query.ranking
Class MatchPhase
- java.lang.Object
-
- com.yahoo.search.query.ranking.MatchPhase
-
- All Implemented Interfaces:
java.lang.Cloneable
public class MatchPhase extends java.lang.Object implements java.lang.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
Fields Modifier and Type Field Description static java.lang.String
ASCENDING
static java.lang.String
ATTRIBUTE
static java.lang.String
MAX_FILTER_COVERAGE
static java.lang.String
MAX_HITS
-
Constructor Summary
Constructors Constructor Description MatchPhase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchPhase
clone()
boolean
equals(java.lang.Object o)
static QueryProfileType
getArgumentType()
boolean
getAscending()
Returns the order to sort the attribute during the path phase when this takes effect.java.lang.String
getAttribute()
Returns the attribute to use for degradation, or null if noneDiversity
getDiversity()
java.lang.Double
getMaxFilterCoverage()
java.lang.Long
getMaxHits()
Returns 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(java.lang.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 Detail
-
ATTRIBUTE
public static final java.lang.String ATTRIBUTE
- See Also:
- Constant Field Values
-
ASCENDING
public static final java.lang.String ASCENDING
- See Also:
- Constant Field Values
-
MAX_HITS
public static final java.lang.String MAX_HITS
- See Also:
- Constant Field Values
-
MAX_FILTER_COVERAGE
public static final java.lang.String MAX_FILTER_COVERAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getArgumentType
public static QueryProfileType getArgumentType()
-
setAttribute
public void setAttribute(java.lang.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. 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
public java.lang.String 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
public java.lang.Long getMaxHits()
Returns the max hits to aim for producing in the match phase on each content node, or null if not set
-
getMaxFilterCoverage
public java.lang.Double getMaxFilterCoverage()
-
getDiversity
public Diversity getDiversity()
-
setDiversity
public void setDiversity(Diversity diversity)
-
prepare
public void prepare(RankProperties rankProperties)
Internal operation - DO NOT USE
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
clone
public MatchPhase clone()
- Overrides:
clone
in classjava.lang.Object
-
-