Apache Lucene open-source search software
LUCENE-3661: javadocs
Robert Muir8684b78e1e28
diff --git a/lucene/src/java/org/apache/lucene/codecs/Codec.java b/lucene/src/java/org/apache/lucene/codecs/Codec.javaindex 3206a86a401..20df870558c 100644--- a/lucene/src/java/org/apache/lucene/codecs/Codec.java+++ b/lucene/src/java/org/apache/lucene/codecs/Codec.java@@ -22,6 +22,7 @@ import java.util.Set;import org.apache.lucene.index.SegmentInfo;import org.apache.lucene.util.NamedSPILoader;+import org.apache.lucene.store.CompoundFileDirectory;import org.apache.lucene.store.Directory;/**@@ -43,7 +44,11 @@ public abstract class Codec implements NamedSPILoader.NamedSPI {return name;}+ /** Populates <code>files</code> with all filenames needed for+ * the <code>info</code> segment.+ */public void files(Directory dir, SegmentInfo info, Set<String> files) throws IOException {+ assert (dir instanceof CompoundFileDirectory) == false;postingsFormat().files(dir, info, "", files);storedFieldsFormat().files(dir, info, files);termVectorsFormat().files(dir, info, files);@@ -54,6 +59,9 @@ public abstract class Codec implements NamedSPILoader.NamedSPI {normsFormat().files(dir, info, files);}+ /** Populates <code>files</code> with any filenames that are+ * stored outside of CFS for the <code>info</code> segment.+ */public void separateFiles(Directory dir, SegmentInfo info, Set<String> files) throws IOException {liveDocsFormat().separateFiles(dir, info, files);normsFormat().separateFiles(dir, info, files);diff --git a/lucene/src/java/org/apache/lucene/codecs/LiveDocsFormat.java b/lucene/src/java/org/apache/lucene/codecs/LiveDocsFormat.javaindex dffea6c4ffd..f1b654153c1 100644--- a/lucene/src/java/org/apache/lucene/codecs/LiveDocsFormat.java+++ b/lucene/src/java/org/apache/lucene/codecs/LiveDocsFormat.java@@ -26,10 +26,16 @@ import org.apache.lucene.store.IOContext;import org.apache.lucene.util.Bits;import org.apache.lucene.util.MutableBits;+/** Format for live/deleted documents+ * @lucene.experimental */public abstract class LiveDocsFormat {+ /** creates a new mutablebits, with all bits set, for the specified size */public abstract MutableBits newLiveDocs(int size) throws IOException;+ /** creates a new mutablebits of the same bits set and size of existing */public abstract MutableBits newLiveDocs(Bits existing) throws IOException;+ /** reads bits from a file */public abstract Bits readLiveDocs(Directory dir, SegmentInfo info, IOContext context) throws IOException;+ /** writes bits to a file */public abstract void writeLiveDocs(MutableBits bits, Directory dir, SegmentInfo info, IOContext context) throws IOException;public abstract void separateFiles(Directory dir, SegmentInfo info, Set<String> files) throws IOException;}