Skip to content

Commit f7052aa

Browse files
committed
Change to IllegalArgumentException for a bad request response
1 parent f9d813a commit f7052aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/org/elasticsearch/common/lucene/search/function/FieldValueFactorFunction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import org.apache.lucene.index.LeafReaderContext;
1313
import org.apache.lucene.search.Explanation;
14-
import org.elasticsearch.ElasticsearchException;
1514
import org.elasticsearch.common.io.stream.StreamInput;
1615
import org.elasticsearch.common.io.stream.StreamOutput;
1716
import org.elasticsearch.common.io.stream.Writeable;
@@ -73,7 +72,7 @@ public double score(int docId, float subQueryScore) throws IOException {
7372
if (missing != null) {
7473
value = missing;
7574
} else {
76-
throw new ElasticsearchException("Missing value for field [" + field + "]");
75+
throw new IllegalArgumentException("Missing value for field [" + field + "]");
7776
}
7877
}
7978
double val = value * boostFactor;

0 commit comments

Comments
 (0)