File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
server/src/main/java/org/elasticsearch/search/rank
x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 4141 */
4242public abstract class RankBuilder implements VersionedNamedWriteable , ToXContentObject {
4343
44- public static final ParseField RANK_WINDOW_SIZE_FIELD = new ParseField ("rank_window_size" );
44+ public static final ParseField RANK_WINDOW_SIZE_FIELD = new ParseField ("rank_window_size" , "window_size" );
4545
4646 public static final int DEFAULT_RANK_WINDOW_SIZE = SearchService .DEFAULT_SIZE ;
4747
Original file line number Diff line number Diff line change @@ -104,6 +104,40 @@ setup:
104104 - match : { hits.hits.2.fields.text.0: "other" }
105105 - match : { hits.hits.2.fields.keyword.0: "other" }
106106
107+ ---
108+ " Simple rank with old window_size param " :
109+
110+ - requires :
111+ cluster_features : ["gte_v8.16.0"]
112+ reason : " deprecation added in 8.16"
113+ test_runner_features : warnings
114+
115+ - do :
116+ warnings :
117+ - " Deprecated field [rank] used, replaced by [retriever]"
118+ - " Deprecated field [window_size] used, expected [rank_window_size] instead"
119+ search :
120+ index : test
121+ body :
122+ track_total_hits : false
123+ fields : [ "keyword" ]
124+ knn :
125+ field : vector
126+ query_vector : [ 0.0 ]
127+ k : 3
128+ num_candidates : 3
129+ query :
130+ term :
131+ text : term
132+ rank :
133+ rrf :
134+ window_size : 100
135+ rank_constant : 1
136+ size : 1
137+
138+ - match : { hits.hits.0._id: "1" }
139+ - match : { hits.hits.0.fields.keyword.0: "other" }
140+
107141---
108142" Simple rank with multiple bm25 sub searches " :
109143
You can’t perform that action at this time.
0 commit comments