Skip to content

Commit c6ae866

Browse files
committed
Update APIs for 8.8.1
1 parent 1fb4478 commit c6ae866

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@elastic/elasticsearch",
3-
"version": "8.8.0",
4-
"versionCanary": "8.8.0-canary.2",
3+
"version": "8.8.1",
4+
"versionCanary": "8.8.1-canary.1",
55
"description": "The official Elasticsearch client for Node.js",
66
"main": "index.js",
77
"types": "index.d.ts",

src/api/api/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default async function SearchApi<TDocument = unknown, TAggregations = Rec
4242
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<T.SearchResponse<TDocument, TAggregations>>
4343
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<any> {
4444
const acceptedPath: string[] = ['index']
45-
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
45+
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'rank', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
4646
const querystring: Record<string, any> = {}
4747
// @ts-expect-error
4848
const userBody: any = params?.body

src/api/types.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,7 @@ export interface SearchRequest extends RequestBase {
11401140
indices_boost?: Record<IndexName, double>[]
11411141
docvalue_fields?: (QueryDslFieldAndFormat | Field)[]
11421142
knn?: KnnQuery | KnnQuery[]
1143+
rank?: RankContainer
11431144
min_score?: double
11441145
post_filter?: QueryDslQueryContainer
11451146
profile?: boolean
@@ -2368,6 +2369,13 @@ export interface QueryVectorBuilder {
23682369
text_embedding?: TextEmbedding
23692370
}
23702371

2372+
export interface RankBase {
2373+
}
2374+
2375+
export interface RankContainer {
2376+
rrf?: RrfRank
2377+
}
2378+
23712379
export interface RecoveryStats {
23722380
current_as_source: long
23732381
current_as_target: long
@@ -2412,6 +2420,11 @@ export interface Retries {
24122420

24132421
export type Routing = string
24142422

2423+
export interface RrfRank {
2424+
rank_constant?: long
2425+
window_size?: long
2426+
}
2427+
24152428
export interface ScoreSort {
24162429
order?: SortOrder
24172430
}

src/api/typesWithBodyKey.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,7 @@ export interface SearchRequest extends RequestBase {
11941194
indices_boost?: Record<IndexName, double>[]
11951195
docvalue_fields?: (QueryDslFieldAndFormat | Field)[]
11961196
knn?: KnnQuery | KnnQuery[]
1197+
rank?: RankContainer
11971198
min_score?: double
11981199
post_filter?: QueryDslQueryContainer
11991200
profile?: boolean
@@ -2441,6 +2442,13 @@ export interface QueryVectorBuilder {
24412442
text_embedding?: TextEmbedding
24422443
}
24432444

2445+
export interface RankBase {
2446+
}
2447+
2448+
export interface RankContainer {
2449+
rrf?: RrfRank
2450+
}
2451+
24442452
export interface RecoveryStats {
24452453
current_as_source: long
24462454
current_as_target: long
@@ -2485,6 +2493,11 @@ export interface Retries {
24852493

24862494
export type Routing = string
24872495

2496+
export interface RrfRank {
2497+
rank_constant?: long
2498+
window_size?: long
2499+
}
2500+
24882501
export interface ScoreSort {
24892502
order?: SortOrder
24902503
}

0 commit comments

Comments
 (0)