| java.lang.Object org.apache.lucene.misc.LengthNormModifier
LengthNormModifier | public class LengthNormModifier (Code) | | Given a directory, a Similarity, and a list of fields, updates the
fieldNorms in place for every document using the Similarity.lengthNorm.
NOTE: This only works if you do not use field/document boosts in your
index.
version: $Id$ |
Method Summary | |
public static void | main(String[] args) Command Line Execution method. | public void | reSetNorms(String field) Resets the norms for the specified field. |
LengthNormModifier | public LengthNormModifier(Directory d, Similarity s)(Code) | | Constructor for code that wishes to use this class progaomatically.
Parameters: d - The Directory to modify Parameters: s - The Similarity to use in reSetNorms |
main | public static void main(String[] args) throws IOException(Code) | | Command Line Execution method.
Usage: LengthNormModifier /path/index package.SimilarityClassName field1 field2 ...
|
reSetNorms | public void reSetNorms(String field) throws IOException(Code) | | Resets the norms for the specified field.
Opens a new IndexReader on the Directory given to this instance,
modifies the norms using the Similarity given to this instance,
and closes the IndexReader.
Parameters: field - the field whose norms should be reset |
|
|