Class SimpleTextSegmentInfoFormat
- java.lang.Object
-
- org.apache.lucene.codecs.SegmentInfoFormat
-
- org.apache.lucene.codecs.simpletext.SimpleTextSegmentInfoFormat
-
public class SimpleTextSegmentInfoFormat extends SegmentInfoFormat
plain text segments file format.FOR RECREATIONAL USE ONLY
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static BytesRef
SI_ATT_KEY
(package private) static BytesRef
SI_ATT_VALUE
(package private) static BytesRef
SI_DIAG_KEY
(package private) static BytesRef
SI_DIAG_VALUE
(package private) static BytesRef
SI_DOCCOUNT
static java.lang.String
SI_EXTENSION
(package private) static BytesRef
SI_FILE
(package private) static BytesRef
SI_ID
(package private) static BytesRef
SI_MIN_VERSION
(package private) static BytesRef
SI_NUM_ATT
(package private) static BytesRef
SI_NUM_DIAG
(package private) static BytesRef
SI_NUM_FILES
(package private) static BytesRef
SI_SELECTOR_TYPE
(package private) static BytesRef
SI_SORT
(package private) static BytesRef
SI_SORT_FIELD
(package private) static BytesRef
SI_SORT_MISSING
(package private) static BytesRef
SI_SORT_REVERSE
(package private) static BytesRef
SI_SORT_TYPE
(package private) static BytesRef
SI_USECOMPOUND
(package private) static BytesRef
SI_VERSION
-
Constructor Summary
Constructors Constructor Description SimpleTextSegmentInfoFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentInfo
read(Directory directory, java.lang.String segmentName, byte[] segmentID, IOContext context)
ReadSegmentInfo
data from a directory.private SortedNumericSelector.Type
readNumericSelector(IndexInput input, BytesRefBuilder scratch)
private SortedSetSelector.Type
readSetSelector(IndexInput input, BytesRefBuilder scratch)
private java.lang.String
readString(int offset, BytesRefBuilder scratch)
void
write(Directory dir, SegmentInfo si, IOContext ioContext)
WriteSegmentInfo
data.
-
-
-
Field Detail
-
SI_VERSION
static final BytesRef SI_VERSION
-
SI_MIN_VERSION
static final BytesRef SI_MIN_VERSION
-
SI_DOCCOUNT
static final BytesRef SI_DOCCOUNT
-
SI_USECOMPOUND
static final BytesRef SI_USECOMPOUND
-
SI_NUM_DIAG
static final BytesRef SI_NUM_DIAG
-
SI_DIAG_KEY
static final BytesRef SI_DIAG_KEY
-
SI_DIAG_VALUE
static final BytesRef SI_DIAG_VALUE
-
SI_NUM_ATT
static final BytesRef SI_NUM_ATT
-
SI_ATT_KEY
static final BytesRef SI_ATT_KEY
-
SI_ATT_VALUE
static final BytesRef SI_ATT_VALUE
-
SI_NUM_FILES
static final BytesRef SI_NUM_FILES
-
SI_FILE
static final BytesRef SI_FILE
-
SI_ID
static final BytesRef SI_ID
-
SI_SORT
static final BytesRef SI_SORT
-
SI_SORT_FIELD
static final BytesRef SI_SORT_FIELD
-
SI_SORT_TYPE
static final BytesRef SI_SORT_TYPE
-
SI_SELECTOR_TYPE
static final BytesRef SI_SELECTOR_TYPE
-
SI_SORT_REVERSE
static final BytesRef SI_SORT_REVERSE
-
SI_SORT_MISSING
static final BytesRef SI_SORT_MISSING
-
SI_EXTENSION
public static final java.lang.String SI_EXTENSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
read
public SegmentInfo read(Directory directory, java.lang.String segmentName, byte[] segmentID, IOContext context) throws java.io.IOException
Description copied from class:SegmentInfoFormat
ReadSegmentInfo
data from a directory.- Specified by:
read
in classSegmentInfoFormat
- Parameters:
directory
- directory to read fromsegmentName
- name of the segment to readsegmentID
- expected identifier for the segment- Returns:
- infos instance to be populated with data
- Throws:
java.io.IOException
- If an I/O error occurs
-
readString
private java.lang.String readString(int offset, BytesRefBuilder scratch)
-
readSetSelector
private SortedSetSelector.Type readSetSelector(IndexInput input, BytesRefBuilder scratch) throws java.io.IOException
- Throws:
java.io.IOException
-
readNumericSelector
private SortedNumericSelector.Type readNumericSelector(IndexInput input, BytesRefBuilder scratch) throws java.io.IOException
- Throws:
java.io.IOException
-
write
public void write(Directory dir, SegmentInfo si, IOContext ioContext) throws java.io.IOException
Description copied from class:SegmentInfoFormat
WriteSegmentInfo
data. The codec must add its SegmentInfo filename(s) toinfo
before doing i/o.- Specified by:
write
in classSegmentInfoFormat
- Throws:
java.io.IOException
- If an I/O error occurs
-
-