mirror of https://github.com/apache/lucene.git
LUCENE-4086: remove 3.x cruft
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1348907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cda03034d0
commit
b7a1c626dc
|
@ -345,11 +345,7 @@ final class SegmentMerger {
|
|||
private void mergePerDoc(SegmentWriteState segmentWriteState) throws IOException {
|
||||
final PerDocConsumer docsConsumer = codec.docValuesFormat()
|
||||
.docsConsumer(new PerDocWriteState(segmentWriteState));
|
||||
// TODO: remove this check when 3.x indexes are no longer supported
|
||||
// (3.x indexes don't have docvalues)
|
||||
if (docsConsumer == null) {
|
||||
return;
|
||||
}
|
||||
assert docsConsumer != null;
|
||||
boolean success = false;
|
||||
try {
|
||||
docsConsumer.merge(mergeState);
|
||||
|
@ -366,11 +362,7 @@ final class SegmentMerger {
|
|||
private void mergeNorms(SegmentWriteState segmentWriteState) throws IOException {
|
||||
final PerDocConsumer docsConsumer = codec.normsFormat()
|
||||
.docsConsumer(new PerDocWriteState(segmentWriteState));
|
||||
// TODO: remove this check when 3.x indexes are no longer supported
|
||||
// (3.x indexes don't have docvalues)
|
||||
if (docsConsumer == null) {
|
||||
return;
|
||||
}
|
||||
assert docsConsumer != null;
|
||||
boolean success = false;
|
||||
try {
|
||||
docsConsumer.merge(mergeState);
|
||||
|
|
|
@ -73,8 +73,8 @@ public class BM25Similarity extends Similarity {
|
|||
}
|
||||
|
||||
/** The default implementation computes the average as <code>sumTotalTermFreq / maxDoc</code>,
|
||||
* or returns <code>1</code> if the index does not store sumTotalTermFreq (Lucene 3.x indexes
|
||||
* or any field that omits frequency information). */
|
||||
* or returns <code>1</code> if the index does not store sumTotalTermFreq:
|
||||
* any field that omits frequency information). */
|
||||
protected float avgFieldLength(CollectionStatistics collectionStats) {
|
||||
final long sumTotalTermFreq = collectionStats.sumTotalTermFreq();
|
||||
if (sumTotalTermFreq <= 0) {
|
||||
|
|
Loading…
Reference in New Issue