mirror of https://github.com/apache/lucene.git
LUCENE-2946: doc 4.0 compound file format
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1332632 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f3293ed12
commit
841c9346ef
|
@ -17,8 +17,11 @@ package org.apache.lucene.store;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.codecs.Codec; // javadocs
|
||||
import org.apache.lucene.codecs.LiveDocsFormat; // javadocs
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.apache.lucene.index.IndexFileNames;
|
||||
import org.apache.lucene.store.DataOutput; // javadocs
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -32,6 +35,32 @@ import java.io.IOException;
|
|||
* Class for accessing a compound stream.
|
||||
* This class implements a directory, but is limited to only read operations.
|
||||
* Directory methods that would normally modify data throw an exception.
|
||||
* <p>
|
||||
* All files belonging to a segment have the same name with varying extensions.
|
||||
* The extensions correspond to the different file formats used by the {@link Codec}.
|
||||
* When using the Compound File format these files are collapsed into a
|
||||
* single <tt>.cfs</tt> file (except for the {@link LiveDocsFormat}, with a
|
||||
* corresponding <tt>.cfe</tt> file indexing its sub-files.
|
||||
* <p>
|
||||
* Files:
|
||||
* <ul>
|
||||
* <li><tt>.cfs</tt>: An optional "virtual" file consisting of all the other
|
||||
* index files for systems that frequently run out of file handles.
|
||||
* <li><tt>.cfe</tt>: The "virtual" compound file's entry table holding all
|
||||
* entries in the corresponding .cfs file.
|
||||
* </ul>
|
||||
* <p>Description:</p>
|
||||
* <ul>
|
||||
* <li>Compound (.cfs) --> FileData <sup>FileCount</sup></li>
|
||||
* <li>Compound Entry Table (.cfe) --> Version, FileCount, <FileName,
|
||||
* DataOffset, DataLength> <sup>FileCount</sup></li>
|
||||
* <li>Version --> {@link DataOutput#writeInt Int32}</li>
|
||||
* <li>FileCount --> {@link DataOutput#writeVInt VInt}</li>
|
||||
* <li>DataOffset,DataLength --> {@link DataOutput#writeLong UInt64}</li>
|
||||
* <li>FileName --> {@link DataOutput#writeString String}</li>
|
||||
* <li>FileData --> raw file data</li>
|
||||
* </ul>
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
public final class CompoundFileDirectory extends Directory {
|
||||
|
|
Loading…
Reference in New Issue