diff --git a/lucene/core/src/java/org/apache/lucene/codecs/SimpleDVConsumer.java b/lucene/core/src/java/org/apache/lucene/codecs/SimpleDVConsumer.java index 73b23a5c995..260ba7c5f42 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/SimpleDVConsumer.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/SimpleDVConsumer.java @@ -33,10 +33,11 @@ public abstract class SimpleDVConsumer implements Closeable { // TODO: are any of these params too "infringing" on codec? // we want codec to get necessary stuff from IW, but trading off against merge complexity. + // nocommit should we pass SegmentWriteState...? public abstract NumericDocValuesConsumer addNumericField(FieldInfo field, long minValue, long maxValue) throws IOException; public abstract BinaryDocValuesConsumer addBinaryField(FieldInfo field, boolean fixedLength, int maxLength) throws IOException; // nocommit: figure out whats fair here. - public abstract SortedDocValuesConsumer addSortedField(FieldInfo field) throws IOException; + public abstract SortedDocValuesConsumer addSortedField(FieldInfo field, int valueCount, boolean fixedLength, int maxLength) throws IOException; public void merge(MergeState mergeState) throws IOException { for (FieldInfo field : mergeState.fieldInfos) { diff --git a/lucene/core/src/java/org/apache/lucene/codecs/SortedDocValuesConsumer.java b/lucene/core/src/java/org/apache/lucene/codecs/SortedDocValuesConsumer.java index f3829bb88a8..4e9a0344b0a 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/SortedDocValuesConsumer.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/SortedDocValuesConsumer.java @@ -19,5 +19,12 @@ package org.apache.lucene.codecs; // TODO! public class SortedDocValuesConsumer { - + + /** This is called, in value sort order, once per unique + * value. */ + public abstract void addValue(BytesRef value); + + /** This is called once per document after all values are + * added. */ + public abstract void addDoc(int ord); }