Package org.apache.lucene.codecs
Class NormsProducer
- java.lang.Object
-
- org.apache.lucene.codecs.NormsProducer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
Lucene70NormsProducer,Lucene80NormsProducer,Lucene90NormsProducer,SimpleTextNormsFormat.SimpleTextNormsProducer
public abstract class NormsProducer extends java.lang.Object implements java.io.CloseableAbstract API that produces field normalization values
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNormsProducer()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcheckIntegrity()Checks consistency of this producerNormsProducergetMergeInstance()Returns an instance optimized for merging.abstract NumericDocValuesgetNorms(FieldInfo field)ReturnsNumericDocValuesfor this field.
-
-
-
Method Detail
-
getNorms
public abstract NumericDocValues getNorms(FieldInfo field) throws java.io.IOException
ReturnsNumericDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the given field doesn't have norms enabled on itsFieldInfo. The return value is nevernull.- Throws:
java.io.IOException
-
checkIntegrity
public abstract void checkIntegrity() throws java.io.IOExceptionChecks consistency of this producerNote that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Throws:
java.io.IOException
-
getMergeInstance
public NormsProducer getMergeInstance()
Returns an instance optimized for merging. This instance may only be used from the thread that acquires it.The default implementation returns
this
-
-