Fix build: restore illegalScorer still in use in ExpressionSearchScript
This commit is contained in:
parent
52eb6f3830
commit
c4554fedad
|
@ -638,6 +638,56 @@ public class Lucene {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Scorer that throws an ElasticsearchIllegalStateException
|
||||
* on all operations with the given message.
|
||||
*/
|
||||
public static Scorer illegalScorer(final String message) {
|
||||
return new Scorer(null) {
|
||||
@Override
|
||||
public float score() throws IOException {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public int freq() throws IOException {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public int docID() {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public DocIdSetIterator iterator() {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Scorer that throws an ElasticsearchIllegalStateException
|
||||
* on all operations with the given message.
|
||||
*/
|
||||
public static Scorer illegalScorer(final String message) {
|
||||
return new Scorer(null) {
|
||||
@Override
|
||||
public float score() throws IOException {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public int freq() throws IOException {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public int docID() {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
@Override
|
||||
public DocIdSetIterator iterator() {
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static final class CommitPoint extends IndexCommit {
|
||||
private String segmentsFileName;
|
||||
private final Collection<String> files;
|
||||
|
|
Loading…
Reference in New Issue