Class 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 object
      java.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.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

        protected final double DEFAULT
    • Constructor Detail

      • ResetScores

        public ResetScores()
    • 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 interface DocumentScoreModifier
        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 interface DocumentScoreModifier
        Parameters:
        index - Index the data structures used for retrieval.
        queryTerms - MatchingQueryTerms[] the query terms
        resultSet - 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 interface DocumentScoreModifier
        Overrides:
        clone in class java.lang.Object