Class SimpleTextPointsReader
- java.lang.Object
-
- org.apache.lucene.codecs.PointsReader
-
- org.apache.lucene.codecs.simpletext.SimpleTextPointsReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Accountable
class SimpleTextPointsReader extends PointsReader
-
-
Field Summary
Fields Modifier and Type Field Description private IndexInputdataIn(package private) java.util.Map<java.lang.String,SimpleTextBKDReader>readers(package private) SegmentReadStatereadState(package private) BytesRefBuilderscratch-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description SimpleTextPointsReader(SegmentReadState readState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIntegrity()Checks consistency of this reader.voidclose()PointValuesgetValues(java.lang.String fieldName)ReturnPointValuesfor the givenfield.private SimpleTextBKDReaderinitReader(long fp)private intparseInt(BytesRef prefix)private longparseLong(BytesRef prefix)longramBytesUsed()Return the memory usage of this object in bytes.private voidreadLine(IndexInput in)private booleanstartsWith(BytesRef prefix)private java.lang.StringstripPrefix(BytesRef prefix)java.lang.StringtoString()-
Methods inherited from class org.apache.lucene.codecs.PointsReader
getMergeInstance
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
dataIn
private final IndexInput dataIn
-
readState
final SegmentReadState readState
-
readers
final java.util.Map<java.lang.String,SimpleTextBKDReader> readers
-
scratch
final BytesRefBuilder scratch
-
-
Constructor Detail
-
SimpleTextPointsReader
public SimpleTextPointsReader(SegmentReadState readState) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
initReader
private SimpleTextBKDReader initReader(long fp) throws java.io.IOException
- Throws:
java.io.IOException
-
readLine
private void readLine(IndexInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
startsWith
private boolean startsWith(BytesRef prefix)
-
parseInt
private int parseInt(BytesRef prefix)
-
parseLong
private long parseLong(BytesRef prefix)
-
stripPrefix
private java.lang.String stripPrefix(BytesRef prefix)
-
getValues
public PointValues getValues(java.lang.String fieldName) throws java.io.IOException
Description copied from class:PointsReaderReturnPointValuesfor the givenfield.- Specified by:
getValuesin classPointsReader- Throws:
java.io.IOException
-
checkIntegrity
public void checkIntegrity() throws java.io.IOExceptionDescription copied from class:PointsReaderChecks consistency of this reader.Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Specified by:
checkIntegrityin classPointsReader- Throws:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-