Package org.apache.lucene.index
Class FieldNormModifier
- java.lang.Object
-
- org.apache.lucene.index.FieldNormModifier
-
@Deprecated public class FieldNormModifier extends Object
Deprecated.This class is broken, as it does not correctly take position overlaps into account.Given a directory and a list of fields, updates the fieldNorms in place for every document. If Similarity class is specified, uses its computeNorm method to set norms. If -n command line argument is used, removed field norms, as ifField.Index
.NO_NORMS was used.NOTE: This will overwrite any length normalization or field/document boosts.
-
-
Constructor Summary
Constructors Constructor Description FieldNormModifier(Directory d, Similarity s)
Deprecated.Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
main(String[] args)
Deprecated.Command Line Execution method.void
reSetNorms(String field)
Deprecated.Resets the norms for the specified field.
-
-
-
Constructor Detail
-
FieldNormModifier
public FieldNormModifier(Directory d, Similarity s)
Deprecated.Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.- Parameters:
d
- the Directory to modifys
- the Similarity to use (can be null)
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException
Deprecated.Command Line Execution method.Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ...
- Throws:
IOException
-
reSetNorms
public void reSetNorms(String field) throws IOException
Deprecated.Resets the norms for the specified field.Opens a new IndexReader on the Directory given to this instance, modifies the norms (either using the Similarity given to this instance, or by using fake norms, and closes the IndexReader.
- Parameters:
field
- the field whose norms should be reset- Throws:
IOException
-
-