mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 11:05:29 +00:00
Remove invalid use of Exception for something it was not intended to
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1212994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4128bd21a
commit
1757f192ac
@ -23,7 +23,6 @@ import org.apache.lucene.index.Fields;
|
|||||||
import org.apache.lucene.index.TermsEnum;
|
import org.apache.lucene.index.TermsEnum;
|
||||||
import org.apache.lucene.index.FieldsEnum;
|
import org.apache.lucene.index.FieldsEnum;
|
||||||
import org.apache.lucene.index.Terms;
|
import org.apache.lucene.index.Terms;
|
||||||
import org.apache.lucene.index.FieldReaderException;
|
|
||||||
import org.apache.lucene.index.DocsEnum;
|
import org.apache.lucene.index.DocsEnum;
|
||||||
import org.apache.lucene.search.DocIdSetIterator;
|
import org.apache.lucene.search.DocIdSetIterator;
|
||||||
import org.apache.lucene.store.FSDirectory;
|
import org.apache.lucene.store.FSDirectory;
|
||||||
@ -117,7 +116,7 @@ public class HighFreqTerms {
|
|||||||
if (field != null) {
|
if (field != null) {
|
||||||
Fields fields = MultiFields.getFields(reader);
|
Fields fields = MultiFields.getFields(reader);
|
||||||
if (fields == null) {
|
if (fields == null) {
|
||||||
throw new FieldReaderException("field " + field + " not found");
|
throw new RuntimeException("field " + field + " not found");
|
||||||
}
|
}
|
||||||
Terms terms = fields.terms(field);
|
Terms terms = fields.terms(field);
|
||||||
if (terms != null) {
|
if (terms != null) {
|
||||||
@ -128,7 +127,7 @@ public class HighFreqTerms {
|
|||||||
} else {
|
} else {
|
||||||
Fields fields = MultiFields.getFields(reader);
|
Fields fields = MultiFields.getFields(reader);
|
||||||
if (fields == null) {
|
if (fields == null) {
|
||||||
throw new FieldReaderException("no fields found for this index");
|
throw new RuntimeException("no fields found for this index");
|
||||||
}
|
}
|
||||||
tiq = new TermStatsQueue(numTerms);
|
tiq = new TermStatsQueue(numTerms);
|
||||||
FieldsEnum fieldsEnum = fields.iterator();
|
FieldsEnum fieldsEnum = fields.iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user