mirror of
https://github.com/apache/lucene.git
synced 2025-03-06 16:29:30 +00:00
Remove IOException from MultiTermQuery#getTermsCount (#13701)
Neither this method nor any of the two overrides can throw an IOException. This change removes the throws clauses from this method in order simplify not have to handle them on the callers side.
This commit is contained in:
parent
ea1441c81c
commit
6d373dbb4e
@ -313,7 +313,7 @@ public abstract class MultiTermQuery extends Query {
|
||||
* Return the number of unique terms contained in this query, if known up-front. If not known, -1
|
||||
* will be returned.
|
||||
*/
|
||||
public long getTermsCount() throws IOException {
|
||||
public long getTermsCount() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class TermInSetQuery extends MultiTermQuery implements Accountable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTermsCount() throws IOException {
|
||||
public long getTermsCount() {
|
||||
return termData.size();
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class TermsQuery extends MultiTermQuery implements Accountable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTermsCount() throws IOException {
|
||||
public long getTermsCount() {
|
||||
return terms.size();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user