Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Apr 9, 2024
1 parent 7a668f4 commit c07ed5e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 88 deletions.
86 changes: 42 additions & 44 deletions output/openapi/elasticsearch-serverless-openapi.json

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

40 changes: 10 additions & 30 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/schema/validation-errors.json

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

6 changes: 2 additions & 4 deletions output/typescript/types.ts

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

13 changes: 3 additions & 10 deletions specification/_types/Knn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { Field } from '@_types/common'
import { long, float } from '@_types/Numeric'
import { QueryContainer } from './query_dsl/abstractions'
import { QueryBase, QueryContainer } from './query_dsl/abstractions'
import { InnerHits } from '@global/search/_types/hits'

export type QueryVector = float[]
Expand Down Expand Up @@ -51,28 +51,21 @@ export interface KnnSearch {
inner_hits?: InnerHits
}

export interface KnnQuery {
export interface KnnQuery extends QueryBase {
/** The name of the vector field to search against */
field: Field
/** The query vector */
query_vector?: QueryVector
/** The query vector builder. You must provide a query_vector_builder or query_vector, but not both. */
query_vector_builder?: QueryVectorBuilder
/** The final number of nearest neighbors to return as top hits */
k: long
/** The number of nearest neighbor candidates to consider per shard */
num_candidates: long
num_candidates?: long
/** Boost value to apply to kNN scores */
boost?: float
/** Filters for the kNN search query */
filter?: QueryContainer | QueryContainer[]
/** The minimum similarity for a vector to be considered a match */
similarity?: float
/**
* If defined, each search hit will contain inner hits.
* @doc_id knn-inner-hits
*/
inner_hits?: InnerHits
}

/** @variants container */
Expand Down

0 comments on commit c07ed5e

Please sign in to comment.