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
Codec
s.
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 int
private final String
private final Directory
private IndexOutput
private final String
private IndexOutput
private final byte[]
private final IOContext
private final String
private long
private final String
private int
private int
(package private) static final int
(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
(package private) void
finish
(int numDocs, long maxPointer, IndexOutput metaOut) (package private) void
writeIndex
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-