Module org.apache.lucene.core
Class FieldsIndexWriter
java.lang.Object
org.apache.lucene.codecs.lucene90.compressing.FieldsIndexWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
Efficient index format for block-based
Codecs.
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 the DirectMonotonicReader that records doc IDS, and the returned index
is used to look up the start pointer in the DirectMonotonicReader that records start
pointers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Stringprivate final Directoryprivate IndexOutputprivate final Stringprivate IndexOutputprivate final byte[]private final IOContextprivate final Stringprivate longprivate final Stringprivate intprivate int(package private) static final int(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()(package private) voidfinish(int numDocs, long maxPointer, IndexOutput metaOut) (package private) voidwriteIndex(int numDocs, long startPointer)
-
Field Details
-
VERSION_START
static final int VERSION_START- See Also:
-
VERSION_CURRENT
static final int VERSION_CURRENT- See Also:
-
dir
-
name
-
suffix
-
extension
-
codecName
-
id
private final byte[] id -
blockShift
private final int blockShift -
ioContext
-
docsOut
-
filePointersOut
-
totalDocs
private int totalDocs -
totalChunks
private int totalChunks -
previousFP
private long previousFP
-
-
Constructor Details
-
FieldsIndexWriter
FieldsIndexWriter(Directory dir, String name, String suffix, String extension, String codecName, byte[] id, int blockShift, IOContext ioContext) throws IOException - Throws:
IOException
-
-
Method Details
-
writeIndex
- Throws:
IOException
-
finish
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-