Skip to content

Commit

Permalink
Make k and num_candidates optional in kNN queries
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Apr 8, 2024
1 parent 21f5860 commit 7a668f4
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 24 deletions.
62 changes: 56 additions & 6 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

153 changes: 144 additions & 9 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions specification/_global/msearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { Rescore } from '@global/search/_types/rescoring'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { ScriptField } from '@_types/Scripting'
import { KnnQuery } from '@_types/Knn'
import { KnnSearch } from '@_types/Knn'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

/**
Expand Down Expand Up @@ -101,7 +101,7 @@ export class MultisearchBody {
* @availability stack since=8.4.0
* @availability serverless
*/
knn?: KnnQuery | KnnQuery[]
knn?: KnnSearch | KnnSearch[]
/**
* Starting document offset. By default, you cannot page through more than 10,000
* hits using the from and size parameters. To page through more hits, use the
Expand Down
4 changes: 2 additions & 2 deletions specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { Suggester } from './_types/suggester'
import { TrackHits } from '@global/search/_types/hits'
import { Operator } from '@_types/query_dsl/Operator'
import { Sort, SortResults } from '@_types/sort'
import { KnnQuery } from '@_types/Knn'
import { KnnSearch } from '@_types/Knn'
import { RankContainer } from '@_types/Rank'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

Expand Down Expand Up @@ -384,7 +384,7 @@ export interface Request extends RequestBase {
* @availability stack since=8.4.0
* @availability serverless
*/
knn?: KnnQuery | KnnQuery[]
knn?: KnnSearch | KnnSearch[]
/**
* Defines the Reciprocal Rank Fusion (RRF) to use.
* @availability stack since=8.8.0
Expand Down
Loading

0 comments on commit 7a668f4

Please sign in to comment.