Skip to content

Commit 7a668f4

Browse files
committed
Make k and num_candidates optional in kNN queries
1 parent 21f5860 commit 7a668f4

File tree

7 files changed

+248
-24
lines changed

7 files changed

+248
-24
lines changed

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 56 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 144 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/msearch/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { Rescore } from '@global/search/_types/rescoring'
4141
import { SourceConfig } from '@global/search/_types/SourceFilter'
4242
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
4343
import { ScriptField } from '@_types/Scripting'
44-
import { KnnQuery } from '@_types/Knn'
44+
import { KnnSearch } from '@_types/Knn'
4545
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
4646

4747
/**
@@ -101,7 +101,7 @@ export class MultisearchBody {
101101
* @availability stack since=8.4.0
102102
* @availability serverless
103103
*/
104-
knn?: KnnQuery | KnnQuery[]
104+
knn?: KnnSearch | KnnSearch[]
105105
/**
106106
* Starting document offset. By default, you cannot page through more than 10,000
107107
* hits using the from and size parameters. To page through more hits, use the

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { Suggester } from './_types/suggester'
4646
import { TrackHits } from '@global/search/_types/hits'
4747
import { Operator } from '@_types/query_dsl/Operator'
4848
import { Sort, SortResults } from '@_types/sort'
49-
import { KnnQuery } from '@_types/Knn'
49+
import { KnnSearch } from '@_types/Knn'
5050
import { RankContainer } from '@_types/Rank'
5151
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
5252

@@ -384,7 +384,7 @@ export interface Request extends RequestBase {
384384
* @availability stack since=8.4.0
385385
* @availability serverless
386386
*/
387-
knn?: KnnQuery | KnnQuery[]
387+
knn?: KnnSearch | KnnSearch[]
388388
/**
389389
* Defines the Reciprocal Rank Fusion (RRF) to use.
390390
* @availability stack since=8.8.0

0 commit comments

Comments
 (0)