Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

clear up some nocommits

Robert Muir48f191aae2af
diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesConsumer.java b/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesConsumer.java
index 9551927c9fb..b63ea193859 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesConsumer.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesConsumer.java
@@ -122,12 +122,10 @@ class DiskDocValuesConsumer extends DocValuesConsumer {
@Override
public void close() throws IOException {
- // nocommit: just write this to a RAMfile or something and flush it here, with #fields first.
- // this meta is a tiny file so this hurts nobody
boolean success = false;
try {
if (meta != null) {
- meta.writeVInt(-1);
+ meta.writeVInt(-1); // write EOF marker
}
success = true;
} finally {
diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesFormat.java b/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesFormat.java
index a599abb140a..67abc8a0be6 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesFormat.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/diskdv/DiskDocValuesFormat.java
@@ -25,19 +25,22 @@ import org.apache.lucene.codecs.DocValuesFormat;
import org.apache.lucene.index.SegmentReadState;
import org.apache.lucene.index.SegmentWriteState;
-// nocommit fix this
/**
+ * DocValues format that keeps everything on disk.
+ * <p>
* Internally there are only 2 field types:
- * BINARY: a big byte[]
- * NUMERIC: packed ints
- *
- * NumericField = NUMERIC
- * fixedLength BinaryField = BINARY
- * variableLength BinaryField = BINARY + NUMERIC (addresses)
- * fixedLength SortedField = BINARY + NUMERIC (ords)
- * variableLength SortedField = BINARY + NUMERIC (addresses) + NUMERIC (ords)
+ * <ul>
+ * <li>BINARY: a big byte[].
+ * <li>NUMERIC: packed ints
+ * </ul>
+ * SORTED is encoded as BINARY + NUMERIC
+ * <p>
+ * NOTE: Don't use this format in production (its not very efficient).
+ * Most likely you would want some parts in RAM, other parts on disk.
+ * <p>
+ * @lucene.experimental
*/
-public class DiskDocValuesFormat extends DocValuesFormat {
+public final class DiskDocValuesFormat extends DocValuesFormat {
public DiskDocValuesFormat() {
super("Disk");
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
index 7c2205aa3cf..a8aa811c1d5 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
@@ -132,12 +132,10 @@ class Lucene42DocValuesConsumer extends DocValuesConsumer {
@Override
public void close() throws IOException {
- // nocommit: just write this to a RAMfile or something and flush it here, with #fields first.
- // this meta is a tiny file so this hurts nobody
boolean success = false;
try {
if (meta != null) {
- meta.writeVInt(-1);
+ meta.writeVInt(-1); // write EOF marker
}
success = true;
} finally {