Exemple #1
0
            /*(non-Javadoc) @see Mono.Lucene.Net.Search.Weight#sumOfSquaredWeights() */
            public override float SumOfSquaredWeights()
            {
                float sum = subQueryWeight.SumOfSquaredWeights();

                for (int i = 0; i < valSrcWeights.Length; i++)
                {
                    if (qStrict)
                    {
                        valSrcWeights[i].SumOfSquaredWeights();                         // do not include ValueSource part in the query normalization
                    }
                    else
                    {
                        sum += valSrcWeights[i].SumOfSquaredWeights();
                    }
                }
                sum *= Enclosing_Instance.GetBoost() * Enclosing_Instance.GetBoost();                 // boost each sub-weight
                return(sum);
            }
Exemple #2
0
 public override float SumOfSquaredWeights()
 {
     return(weight.SumOfSquaredWeights() * Enclosing_Instance.GetBoost() * Enclosing_Instance.GetBoost());
 }