| java.lang.Object org.apache.lucene.index.FieldNormModifier
FieldNormModifier | public class FieldNormModifier (Code) | | Given a directory and a list of fields, updates the fieldNorms in place for every document.
If Similarity class is specified, uses its lengthNorm method to set norms.
If -n command line argument is used, removed field norms, as if
org.apache.lucene.document.Field.Index .NO_NORMS was used.
NOTE: This will overwrite any length normalization or field/document boosts.
author: Chris Hostetter author: Otis Gospodnetic |
Constructor Summary | |
public | FieldNormModifier(Directory d, Similarity s) Constructor for code that wishes to use this class programatically
If Similarity is null, kill the field norms. |
Method Summary | |
public static void | main(String[] args) Command Line Execution method. | public void | reSetNorms(String field) Resets the norms for the specified field. |
FieldNormModifier | public FieldNormModifier(Directory d, Similarity s)(Code) | | Constructor for code that wishes to use this class programatically
If Similarity is null, kill the field norms.
Parameters: d - the Directory to modify Parameters: s - the Similiary to use (can be null) |
main | public static void main(String[] args) throws IOException(Code) | | Command Line Execution method.
Usage: FieldNormModifier /path/index 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 (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 |
|
|