Skip to content

Commit dea8d6c

Browse files
committed
Cleaning it up
1 parent 74f7a95 commit dea8d6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

x-pack/plugin/search-business-rules/src/main/java/org/elasticsearch/xpack/searchbusinessrules/retriever/PinnedRankDoc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
package org.elasticsearch.xpack.searchbusinessrules.retriever;
99

1010
import org.apache.lucene.search.Explanation;
11+
import org.elasticsearch.TransportVersion;
12+
import org.elasticsearch.TransportVersions;
1113
import org.elasticsearch.common.io.stream.StreamInput;
1214
import org.elasticsearch.common.io.stream.StreamOutput;
1315
import org.elasticsearch.search.rank.RankDoc;
14-
import org.elasticsearch.TransportVersion;
15-
import org.elasticsearch.TransportVersions;
1616

1717
import java.io.IOException;
1818
import java.util.Objects;

x-pack/plugin/search-business-rules/src/main/java/org/elasticsearch/xpack/searchbusinessrules/retriever/PinnedRetrieverBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void validateIdsAndDocs(List<String> ids, List<SpecifiedDocument> docs)
9696
boolean validIds = ids != null && ids.isEmpty() == false;
9797
boolean validDocs = docs != null && docs.isEmpty() == false;
9898

99-
if (!validIds && !validDocs) {
99+
if (validIds == false && validDocs == false) {
100100
throw new IllegalArgumentException("Either 'ids' or 'docs' must be provided and non-empty for pinned retriever");
101101
}
102102
}

0 commit comments

Comments
 (0)