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 doubleDEFAULT
-
Constructor Summary
Constructors Constructor Description ResetScores()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Creates the close of this objectjava.lang.StringgetName()Returns the name of the document score modifier.booleanmodifyScores(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:DocumentScoreModifierReturns the name of the document score modifier.- Specified by:
getNamein interfaceDocumentScoreModifier- Returns:
- String the name of the document score modifier.
-
modifyScores
public boolean modifyScores(Index index, MatchingQueryTerms queryTerms, ResultSet resultSet)
Description copied from interface:DocumentScoreModifierModifies 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:
modifyScoresin 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:
clonein interfaceDocumentScoreModifier- Overrides:
clonein classjava.lang.Object
-
-