From 8570cd94f50b9b9aa3a8b28f09208c3bae503a1e Mon Sep 17 00:00:00 2001 From: Michael Dodsworth Date: Sat, 28 Jun 2014 17:27:54 -0700 Subject: [PATCH] LUCENE-4787: doc fixes related to QueryScorer#getMaxTermWeight diff --git lucene/highlighter/src/java/org/apache/lucene/search/highlight/GradientFormatter.java lucene/highlighter/src/java/org/apache/lucene/search/highlight/GradientFormatter.java index c837bbf..eea0272 100644 --- lucene/highlighter/src/java/org/apache/lucene/search/highlight/GradientFormatter.java +++ lucene/highlighter/src/java/org/apache/lucene/search/highlight/GradientFormatter.java @@ -41,7 +41,7 @@ public class GradientFormatter implements Formatter * Sets the color range for the IDF scores * * @param maxScore - * The score (and above) displayed as maxColor (See QueryScorer.getMaxWeight + * The score (and above) displayed as maxColor (See {@link QueryScorer#getMaxTermWeight()} * which can be used to calibrate scoring scale) * @param minForegroundColor * The hex color used for representing IDF scores of zero eg diff --git lucene/highlighter/src/java/org/apache/lucene/search/highlight/package.html lucene/highlighter/src/java/org/apache/lucene/search/highlight/package.html index b890f25..5af2e81 100755 --- lucene/highlighter/src/java/org/apache/lucene/search/highlight/package.html +++ lucene/highlighter/src/java/org/apache/lucene/search/highlight/package.html @@ -86,10 +86,10 @@ the new TermVector position support (see latest CVS version).

A subtle use of color can help emphasise the reasons for matching (useful when doing "MoreLikeThis" queries and you want to see what the basis of the similarities are).

-

The QueryScorer class has a new constructor which can use an IndexReader to derive the IDF (inverse document frequency) +

The QueryScorer class has constructors that use an IndexReader to derive the IDF (inverse document frequency) for each term in order to influence the score. This is useful for helping to extracting the most significant sections of a document and in supplying scores used by the new GradientFormatter to color significant words more strongly. -The QueryScorer.getMaxWeight method is useful when passed to the GradientFormatter constructor to define the top score +The QueryScorer.getMaxTermWeight method is useful when passed to the GradientFormatter constructor to define the top score which is associated with the top color.

-- 2.0.0