Class FieldsIndexWriter
- java.lang.Object
-
- org.apache.lucene.codecs.compressing.FieldsIndexWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public final class FieldsIndexWriter extends java.lang.Object implements java.io.CloseableEfficient index format for block-basedCodecs.For each block of compressed stored fields, this stores the first document of the block and the start pointer of the block in a
DirectMonotonicWriter. At read time, the docID is binary-searched in theDirectMonotonicReaderthat records doc IDS, and the returned index is used to look up the start pointer in theDirectMonotonicReaderthat records start pointers.
-
-
Field Summary
Fields Modifier and Type Field Description private intblockShiftprivate java.lang.StringcodecNameprivate Directorydirprivate IndexOutputdocsOutprivate java.lang.Stringextensionprivate IndexOutputfilePointersOutprivate byte[]idprivate IOContextioContextprivate java.lang.Stringnameprivate longpreviousFPprivate java.lang.Stringsuffixprivate inttotalChunksprivate inttotalDocs(package private) static intVERSION_CURRENT(package private) static intVERSION_START
-
Constructor Summary
Constructors Constructor Description FieldsIndexWriter(Directory dir, java.lang.String name, java.lang.String suffix, java.lang.String extension, java.lang.String codecName, byte[] id, int blockShift, IOContext ioContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()(package private) voidfinish(int numDocs, long maxPointer, IndexOutput metaOut)(package private) voidwriteIndex(int numDocs, long startPointer)
-
-
-
Field Detail
-
VERSION_START
static final int VERSION_START
- See Also:
- Constant Field Values
-
VERSION_CURRENT
static final int VERSION_CURRENT
- See Also:
- Constant Field Values
-
dir
private final Directory dir
-
name
private final java.lang.String name
-
suffix
private final java.lang.String suffix
-
extension
private final java.lang.String extension
-
codecName
private final java.lang.String codecName
-
id
private final byte[] id
-
blockShift
private final int blockShift
-
ioContext
private final IOContext ioContext
-
docsOut
private IndexOutput docsOut
-
filePointersOut
private IndexOutput filePointersOut
-
totalDocs
private int totalDocs
-
totalChunks
private int totalChunks
-
previousFP
private long previousFP
-
-
Method Detail
-
writeIndex
void writeIndex(int numDocs, long startPointer) throws java.io.IOException- Throws:
java.io.IOException
-
finish
void finish(int numDocs, long maxPointer, IndexOutput metaOut) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-