Skip to content

Commit

Permalink
[Backport 8.10] Added the similarity parameter to the KnnQuery type (#…
Browse files Browse the repository at this point in the history
…2300)

Co-authored-by: Josh Mock <joshua.mock@elastic.co>
Co-authored-by: Peter Straßer <peter.str@hotmail.de>
  • Loading branch information
3 people committed Sep 27, 2023
1 parent 693ba14 commit 3b09f9d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
18 changes: 15 additions & 3 deletions output/schema/schema.json

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

1 change: 1 addition & 0 deletions output/typescript/types.ts

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

4 changes: 3 additions & 1 deletion specification/_types/Knn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { Field } from '@_types/common'
import { long, double, float } from '@_types/Numeric'
import { long, float } from '@_types/Numeric'
import { QueryContainer } from './query_dsl/abstractions'

export type QueryVector = float[]
Expand All @@ -38,6 +38,8 @@ export interface KnnQuery {
boost?: float
/** Filters for the kNN search query */
filter?: QueryContainer | QueryContainer[]
/** The minimum similarity for a vector to be considered a match */
similarity?: float
}

/** @variants container */
Expand Down

0 comments on commit 3b09f9d

Please sign in to comment.