## org.apache.lucene.misc
Class LengthNormModifier

    java.lang.Object
      org.apache.lucene.misc.LengthNormModifier

Deprecated. Use `FieldNormModifier`

    public class LengthNormModifier

extends java.lang.Object

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$

Constructor Summary
`LengthNormModifier(org.apache.lucene.store.Directory d, org.apache.lucene.search.Similarity s)` Deprecated. Constructor for code that wishes to use this class progaomatically.

Method Summary
`static void` `main(java.lang.String[] args)` Deprecated. Command Line Execution method.
`void` `reSetNorms(java.lang.String field)` Deprecated. 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

### LengthNormModifier

    public LengthNormModifier(org.apache.lucene.store.Directory d,
                              org.apache.lucene.search.Similarity s)

  Deprecated.
  Constructor for code that wishes to use this class progaomatically.

  Parameters:
    `d` - The Directory to modify
    `s` - The Similarity to use in `reSetNorms`

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.io.IOException

  Deprecated.
  Command Line Execution method.

       Usage: LengthNormModifier /path/index package.SimilarityClassName field1 field2 ...

  Throws:
    `java.io.IOException`

### reSetNorms

    public void reSetNorms(java.lang.String field)
                    throws java.io.IOException

  Deprecated.
  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
  Throws:
    `java.io.IOException`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.