Skip to content

Commit c504285

Browse files
Anaetheliongithub-actions[bot]
authored andcommitted
add inner_hits field to KnnQuery within search (#2422)
(cherry picked from commit 6a1243d)
1 parent 31beaf3 commit c504285

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

output/openapi/elasticsearch-serverless-openapi.json

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

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ json-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/
219219
k-precision,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-rank-eval.html#k-precision
220220
k-recall,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-rank-eval.html#k-recall
221221
kv-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/kv-processor.html
222+
knn-inner-hits,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/knn-search.html#nested-knn-search-inner-hits
222223
logstash-api-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-delete-pipeline.html
223224
logstash-api-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-get-pipeline.html
224225
logstash-api-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-put-pipeline.html

specification/_types/Knn.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { Field } from '@_types/common'
2121
import { long, float } from '@_types/Numeric'
2222
import { QueryContainer } from './query_dsl/abstractions'
23+
import { InnerHits } from '@global/search/_types/hits'
2324

2425
export type QueryVector = float[]
2526

@@ -40,6 +41,11 @@ export interface KnnQuery {
4041
filter?: QueryContainer | QueryContainer[]
4142
/** The minimum similarity for a vector to be considered a match */
4243
similarity?: float
44+
/**
45+
* If defined, each search hit will contain inner hits.
46+
* @doc_id knn-inner-hits
47+
*/
48+
inner_hits?: InnerHits
4349
}
4450

4551
/** @variants container */

0 commit comments

Comments
 (0)