Skip to content

Commit c07ed5e

Browse files
committed
Address review comments
1 parent 7a668f4 commit c07ed5e

File tree

5 files changed

+58
-88
lines changed

5 files changed

+58
-88
lines changed

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 42 additions & 44 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: 10 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 1 addition & 0 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: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/Knn.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { Field } from '@_types/common'
2121
import { long, float } from '@_types/Numeric'
22-
import { QueryContainer } from './query_dsl/abstractions'
22+
import { QueryBase, QueryContainer } from './query_dsl/abstractions'
2323
import { InnerHits } from '@global/search/_types/hits'
2424

2525
export type QueryVector = float[]
@@ -51,28 +51,21 @@ export interface KnnSearch {
5151
inner_hits?: InnerHits
5252
}
5353

54-
export interface KnnQuery {
54+
export interface KnnQuery extends QueryBase {
5555
/** The name of the vector field to search against */
5656
field: Field
5757
/** The query vector */
5858
query_vector?: QueryVector
5959
/** The query vector builder. You must provide a query_vector_builder or query_vector, but not both. */
6060
query_vector_builder?: QueryVectorBuilder
61-
/** The final number of nearest neighbors to return as top hits */
62-
k: long
6361
/** The number of nearest neighbor candidates to consider per shard */
64-
num_candidates: long
62+
num_candidates?: long
6563
/** Boost value to apply to kNN scores */
6664
boost?: float
6765
/** Filters for the kNN search query */
6866
filter?: QueryContainer | QueryContainer[]
6967
/** The minimum similarity for a vector to be considered a match */
7068
similarity?: float
71-
/**
72-
* If defined, each search hit will contain inner hits.
73-
* @doc_id knn-inner-hits
74-
*/
75-
inner_hits?: InnerHits
7669
}
7770

7871
/** @variants container */

0 commit comments

Comments
 (0)