Package org.terrier.matching.dsms
Class ResetScores
- java.lang.Object
-
- org.terrier.matching.dsms.ResetScores
-
- All Implemented Interfaces:
java.lang.Cloneable
,DocumentScoreModifier
public class ResetScores extends java.lang.Object implements DocumentScoreModifier
Resets the scores in the resultset to 0.00001d- Since:
- 3.5
- Author:
- Craig Macdonald
-
-
Field Summary
Fields Modifier and Type Field Description protected double
DEFAULT
-
Constructor Summary
Constructors Constructor Description ResetScores()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Creates the close of this objectjava.lang.String
getName()
Returns the name of the document score modifier.boolean
modifyScores(Index index, MatchingQueryTerms queryTerms, ResultSet resultSet)
Modifies the scores of the documents for a given query.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:DocumentScoreModifier
Returns the name of the document score modifier.- Specified by:
getName
in interfaceDocumentScoreModifier
- Returns:
- String the name of the document score modifier.
-
modifyScores
public boolean modifyScores(Index index, MatchingQueryTerms queryTerms, ResultSet resultSet)
Description copied from interface:DocumentScoreModifier
Modifies the scores of the documents for a given query. This returns a boolean that allows the Matching class to determine if the scores of the documents have actually been altered. This is because the resultset has to be resorted after each one.- Specified by:
modifyScores
in interfaceDocumentScoreModifier
- Parameters:
index
- Index the data structures used for retrieval.queryTerms
- MatchingQueryTerms[] the query termsresultSet
- ResultSet the current set of results.- Returns:
- true if any scores have been altered
-
clone
public java.lang.Object clone()
Creates the close of this object- Specified by:
clone
in interfaceDocumentScoreModifier
- Overrides:
clone
in classjava.lang.Object
-
-