|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.misc.LengthNormModifier
public class LengthNormModifier
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.
Constructor Summary | |
---|---|
LengthNormModifier(Directory d,
Similarity s)
Constructor for code that wishes to use this class progaomatically. |
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 LengthNormModifier(Directory d, Similarity s)
d
- The Directory to modifys
- The Similarity to use in reSetNorms
Method Detail |
---|
public static void main(String[] args) throws IOException
Usage: LengthNormModifier /path/index package.SimilarityClassName field1 field2 ...
IOException
public void reSetNorms(String field) throws IOException
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.
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 |