|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.index.FieldNormModifier
public class FieldNormModifier
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 if
Field.Index.NO_NORMS was used.
NOTE: This will overwrite any length normalization or field/document boosts.
| Constructor Summary | |
|---|---|
FieldNormModifier(Directory d,
Similarity s)
Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Command Line Execution method. |
void |
reSetNorms(String field)
Resets the norms for the specified field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldNormModifier(Directory d,
Similarity s)
d - the Directory to modifys - the Similarity to use (can be null)| Method Detail |
|---|
public static void main(String[] args)
throws IOException
Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ...
IOException
public void reSetNorms(String field)
throws IOException
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.
field - the field whose norms should be reset
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||