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 IndexInput
dataIn
(package private) java.util.Map<java.lang.String,SimpleTextBKDReader>
readers
(package private) SegmentReadState
readState
(package private) BytesRefBuilder
scratch
-
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 void
checkIntegrity()
Checks consistency of this reader.void
close()
PointValues
getValues(java.lang.String fieldName)
ReturnPointValues
for the givenfield
.private SimpleTextBKDReader
initReader(long fp)
private int
parseInt(BytesRef prefix)
private long
parseLong(BytesRef prefix)
long
ramBytesUsed()
Return the memory usage of this object in bytes.private void
readLine(IndexInput in)
private boolean
startsWith(BytesRef prefix)
private java.lang.String
stripPrefix(BytesRef prefix)
java.lang.String
toString()
-
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:PointsReader
ReturnPointValues
for the givenfield
.- Specified by:
getValues
in classPointsReader
- Throws:
java.io.IOException
-
checkIntegrity
public void checkIntegrity() throws java.io.IOException
Description copied from class:PointsReader
Checks 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:
checkIntegrity
in classPointsReader
- Throws:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return 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:
toString
in classjava.lang.Object
-
-