Skip to content

Commit 0050ad5

Browse files
committed
Clean up RRFRetrieverBuilder constructors
1 parent a014e02 commit 0050ad5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/rrf/RRFRetrieverBuilder.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,17 @@ public static RRFRetrieverBuilder fromXContent(XContentParser parser, RetrieverP
9898
private final String query;
9999
private final int rankConstant;
100100

101-
public RRFRetrieverBuilder(int rankWindowSize, int rankConstant) {
102-
this(null, rankWindowSize, rankConstant);
103-
}
104-
105-
RRFRetrieverBuilder(List<RetrieverSource> childRetrievers, int rankWindowSize, int rankConstant) {
101+
public RRFRetrieverBuilder(List<RetrieverSource> childRetrievers, int rankWindowSize, int rankConstant) {
106102
this(childRetrievers, null, null, rankWindowSize, rankConstant);
107103
}
108104

109-
RRFRetrieverBuilder(List<RetrieverSource> childRetrievers, List<String> fields, String query, int rankWindowSize, int rankConstant) {
105+
public RRFRetrieverBuilder(
106+
List<RetrieverSource> childRetrievers,
107+
List<String> fields,
108+
String query,
109+
int rankWindowSize,
110+
int rankConstant
111+
) {
110112
// Use a mutable list for childRetrievers so that we can use addChild
111113
super(childRetrievers == null ? new ArrayList<>() : new ArrayList<>(childRetrievers), rankWindowSize);
112114
this.fields = fields == null ? List.of() : List.copyOf(fields);

0 commit comments

Comments
 (0)