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:
Robert Muir 2011-08-30 17:37:05 +00:00
parent 9009a83421
commit 47450677b9
1 changed files with 2 additions and 2 deletions

View File

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