org.apache.lucene.index
Class Norm

java.lang.Object
  extended by org.apache.lucene.index.Norm

public final class Norm
extends Object

Stores the normalization value computed in Similarity.computeNorm(FieldInvertState, Norm) per field. Normalization values must be consistent within a single field, different value types are not permitted within a single field. All values set must be fixed size values ie. all values passed to setBytes(BytesRef) must have the same length per field.

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
Norm()
          Sole constructor.
 
Method Summary
 IndexableField field()
          Returns the IndexableField representation for this norm
 BytesRef getSpare()
          Returns a spare BytesRef
 void setByte(byte norm)
          Sets a byte norm value
 void setBytes(BytesRef norm)
          Sets a fixed byte array norm value
 void setDouble(double norm)
          Sets a double norm value
 void setFloat(float norm)
          Sets a float norm value
 void setInt(int norm)
          Sets a int norm value
 void setLong(long norm)
          Sets a long norm value
 void setShort(short norm)
          Sets a short norm value
 DocValues.Type type()
          Returns the DocValues.Type for this norm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Norm

public Norm()
Sole constructor.

Method Detail

field

public IndexableField field()
Returns the IndexableField representation for this norm


type

public DocValues.Type type()
Returns the DocValues.Type for this norm.


getSpare

public BytesRef getSpare()
Returns a spare BytesRef


setFloat

public void setFloat(float norm)
Sets a float norm value


setDouble

public void setDouble(double norm)
Sets a double norm value


setShort

public void setShort(short norm)
Sets a short norm value


setInt

public void setInt(int norm)
Sets a int norm value


setLong

public void setLong(long norm)
Sets a long norm value


setByte

public void setByte(byte norm)
Sets a byte norm value


setBytes

public void setBytes(BytesRef norm)
Sets a fixed byte array norm value



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