clear nocommits

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1440933 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-01-31 12:40:03 +00:00
parent 54773d36a3
commit 8a2a727873

View File

@ -46,13 +46,10 @@ final class DocValuesProcessor extends StoredFieldsConsumer {
@Override @Override
void finishDocument() { void finishDocument() {
// nocommit catch missing DV fields here? else we have
// null/"" depending on how docs landed in segments?
} }
@Override @Override
public void addField(int docID, StorableField field, FieldInfo fieldInfo) { public void addField(int docID, StorableField field, FieldInfo fieldInfo) {
// nocommit: these checks are duplicated everywhere
final DocValuesType dvType = field.fieldType().docValueType(); final DocValuesType dvType = field.fieldType().docValueType();
if (dvType != null) { if (dvType != null) {
fieldInfo.setDocValuesType(dvType); fieldInfo.setDocValuesType(dvType);
@ -82,6 +79,10 @@ final class DocValuesProcessor extends StoredFieldsConsumer {
writer.finish(state.segmentInfo.getDocCount()); writer.finish(state.segmentInfo.getDocCount());
writer.flush(state, dvConsumer); writer.flush(state, dvConsumer);
} }
// TODO: catch missing DV fields here? else we have
// null/"" depending on how docs landed in segments?
// but we can't detect all cases, and we should leave
// this behavior undefined. dv is not "schemaless": its column-stride.
writers.clear(); writers.clear();
success = true; success = true;
} finally { } finally {