mirror of https://github.com/apache/lucene.git
LUCENE-3407: fix test fail for SimpleText codec too
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1163304 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9009a83421
commit
47450677b9
|
@ -209,7 +209,7 @@ class SimpleTextFieldsReader extends FieldsProducer {
|
|||
|
||||
@Override
|
||||
public long totalTermFreq() {
|
||||
return totalTermFreq;
|
||||
return indexOptions == IndexOptions.DOCS_ONLY ? -1 : totalTermFreq;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -559,7 +559,7 @@ class SimpleTextFieldsReader extends FieldsProducer {
|
|||
|
||||
@Override
|
||||
public long getSumTotalTermFreq() {
|
||||
return sumTotalTermFreq;
|
||||
return indexOptions == IndexOptions.DOCS_ONLY ? -1 : sumTotalTermFreq;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue