mirror of https://github.com/apache/lucene.git
LUCENE-1456: remove buggy but unused dead code in FieldInfo
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@718537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c9e275c3b
commit
0beb6bd966
|
@ -75,28 +75,4 @@ final class FieldInfo {
|
|||
this.storePayloads = true;
|
||||
}
|
||||
}
|
||||
|
||||
void update(FieldInfo other) {
|
||||
if (isIndexed != other.isIndexed) {
|
||||
isIndexed = true; // once indexed, always index
|
||||
}
|
||||
if (storeTermVector != other.storeTermVector) {
|
||||
storeTermVector = true; // once vector, always vector
|
||||
}
|
||||
if (storePositionWithTermVector != other.storePositionWithTermVector) {
|
||||
storePositionWithTermVector = true; // once vector, always vector
|
||||
}
|
||||
if (storeOffsetWithTermVector != other.storeOffsetWithTermVector) {
|
||||
storeOffsetWithTermVector = true; // once vector, always vector
|
||||
}
|
||||
if (omitNorms != other.omitNorms) {
|
||||
omitNorms = false; // once norms are stored, always store
|
||||
}
|
||||
if (this.omitTf != omitTf) {
|
||||
this.omitTf = true; // if one require omitTf at least once, it remains off for life
|
||||
}
|
||||
if (storePayloads != other.storePayloads) {
|
||||
storePayloads = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,18 +211,6 @@ final class FieldInfos {
|
|||
return fi;
|
||||
}
|
||||
|
||||
synchronized public FieldInfo add(FieldInfo fieldInfo) {
|
||||
FieldInfo fi = fieldInfo(fieldInfo.name);
|
||||
if (fi == null) {
|
||||
return addInternal(fieldInfo.name, fieldInfo.isIndexed, fieldInfo.storeTermVector,
|
||||
fieldInfo.storePositionWithTermVector, fieldInfo.storeOffsetWithTermVector,
|
||||
fieldInfo.omitNorms, fieldInfo.storePayloads, fieldInfo.omitTf);
|
||||
} else {
|
||||
fi.update(fieldInfo);
|
||||
}
|
||||
return fi;
|
||||
}
|
||||
|
||||
private FieldInfo addInternal(String name, boolean isIndexed,
|
||||
boolean storeTermVector, boolean storePositionWithTermVector,
|
||||
boolean storeOffsetWithTermVector, boolean omitNorms, boolean storePayloads, boolean omitTf) {
|
||||
|
|
Loading…
Reference in New Issue