/// <summary>
 /// Initializes a new instance of the FreshnessScoringFunction class
 /// with required arguments.
 /// </summary>
 public FreshnessScoringFunction(FreshnessScoringParameters parameters, string fieldName, double boost)
     : this()
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     if (fieldName == null)
     {
         throw new ArgumentNullException("fieldName");
     }
     this.Parameters = parameters;
     this.FieldName = fieldName;
     this.Boost = boost;
 }
 /// <summary>
 /// Initializes a new instance of the FreshnessScoringFunction class
 /// with required arguments.
 /// </summary>
 public FreshnessScoringFunction(FreshnessScoringParameters parameters, string fieldName, double boost)
     : this()
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     if (fieldName == null)
     {
         throw new ArgumentNullException("fieldName");
     }
     this.Parameters = parameters;
     this.FieldName  = fieldName;
     this.Boost      = boost;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the FreshnessScoringFunction class.
 /// </summary>
 /// <param name="fieldName">The name of the field used as input to the
 /// scoring function.</param>
 /// <param name="boost">A multiplier for the raw score. Must be a
 /// positive number not equal to 1.0.</param>
 /// <param name="parameters">Parameter values for the freshness scoring
 /// function.</param>
 /// <param name="interpolation">A value indicating how boosting will be
 /// interpolated across document scores; defaults to "Linear". Possible
 /// values include: 'linear', 'constant', 'quadratic',
 /// 'logarithmic'</param>
 public FreshnessScoringFunction(string fieldName, double boost, FreshnessScoringParameters parameters, ScoringFunctionInterpolation?interpolation = default(ScoringFunctionInterpolation?))
     : base(fieldName, boost, interpolation)
 {
     Parameters = parameters;
     CustomInit();
 }