/// <summary>
 /// Initializes a new instance of the MagnitudeScoringFunction class
 /// with required arguments.
 /// </summary>
 public MagnitudeScoringFunction(MagnitudeScoringParameters 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;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the MagnitudeScoringFunction class
 /// with required arguments.
 /// </summary>
 public MagnitudeScoringFunction(MagnitudeScoringParameters 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 MagnitudeScoringFunction 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 magnitude 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 MagnitudeScoringFunction(string fieldName, double boost, MagnitudeScoringParameters parameters, ScoringFunctionInterpolation?interpolation = default(ScoringFunctionInterpolation?))
     : base(fieldName, boost, interpolation)
 {
     Parameters = parameters;
     CustomInit();
 }