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 3535 */
3636public abstract class RankBuilder implements VersionedNamedWriteable , ToXContentObject {
3737
38- public static final ParseField RANK_WINDOW_SIZE_FIELD = new ParseField ("rank_window_size" );
38+ public static final ParseField RANK_WINDOW_SIZE_FIELD = new ParseField ("rank_window_size" , "window_size" );
3939
4040 public static final int DEFAULT_RANK_WINDOW_SIZE = SearchService .DEFAULT_SIZE ;
4141
Original file line number Diff line number Diff line change @@ -100,6 +100,40 @@ setup:
100100 - match : { hits.hits.2.fields.text.0: "other" }
101101 - match : { hits.hits.2.fields.keyword.0: "other" }
102102
103+ ---
104+ " Simple rank with old window_size param " :
105+
106+ - requires :
107+ cluster_features : ["gte_v8.16.0"]
108+ reason : " deprecation added in 8.16"
109+ test_runner_features : warnings
110+
111+ - do :
112+ warnings :
113+ - " Deprecated field [rank] used, replaced by [retriever]"
114+ - " Deprecated field [window_size] used, expected [rank_window_size] instead"
115+ search :
116+ index : test
117+ body :
118+ track_total_hits : false
119+ fields : [ "keyword" ]
120+ knn :
121+ field : vector
122+ query_vector : [ 0.0 ]
123+ k : 3
124+ num_candidates : 3
125+ query :
126+ term :
127+ text : term
128+ rank :
129+ rrf :
130+ window_size : 100
131+ rank_constant : 1
132+ size : 1
133+
134+ - match : { hits.hits.0._id: "1" }
135+ - match : { hits.hits.0.fields.keyword.0: "other" }
136+
103137---
104138" Simple rank with multiple bm25 sub searches " :
105139
You can’t perform that action at this time.
0 commit comments