public QueryScorer(WeightedSpanTerm[] weightedTerms) {this.fieldWeightedSpanTerms = new HashMap<>(weightedTerms.length);for (int i = 0; i < weightedTerms.length; i++) {WeightedSpanTerm existingTerm = fieldWeightedSpanTerms.get(weightedTerms[i].term);if ((existingTerm == null) ||(existingTerm.weight < weightedTerms[i].weight)) {fieldWeightedSpanTerms.put(weightedTerms[i].term, weightedTerms[i]);maxTermWeight = Math.max(maxTermWeight, weightedTerms[i].getWeight());}}skipInitExtractor = true;}

public QueryScorer ( WeightedSpanTerm [ ] weightedTerms ) { this . fieldWeightedSpanTerms = new HashMap < > ( weightedTerms . length ) ; for ( int i = 0 ; i < weightedTerms . length ; i ++ ) { WeightedSpanTerm existingTerm = fieldWeightedSpanTerms . get ( weightedTerms [ i ] . term ) ; if ( ( existingTerm == null ) || ( existingTerm . weight < weightedTerms [ i ] . weight ) ) { fieldWeightedSpanTerms . put ( weightedTerms [ i ] . term , weightedTerms [ i ] ) ; maxTermWeight = Math . max ( maxTermWeight , weightedTerms [ i ] . getWeight ( ) ) ; } } skipInitExtractor = true ; }
public QueryScorer(WeightedSpanTerm[] weightedTerms){this.fieldWeightedSpanTerms = new JCG.Dictionary<string, WeightedSpanTerm>(weightedTerms.Length);foreach (WeightedSpanTerm t in weightedTerms){if (!fieldWeightedSpanTerms.TryGetValue(t.Term, out WeightedSpanTerm existingTerm) ||(existingTerm == null) ||(existingTerm.Weight < t.Weight)){fieldWeightedSpanTerms[t.Term] = t;maxTermWeight = Math.Max(maxTermWeight, t.Weight);}}skipInitExtractor = true;}
