add APIs for flushing sorted case

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1407502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-11-09 15:51:06 +00:00
parent 4512c3951d
commit 1c5483b92c
2 changed files with 10 additions and 2 deletions

View File

@ -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) {

View File

@ -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);
}