Skip to content

Commit c867a57

Browse files
committed
Add types to 'knn_search' API
1 parent 83ca450 commit c867a57

File tree

6 files changed

+403
-8
lines changed

6 files changed

+403
-8
lines changed

output/schema/schema.json

Lines changed: 259 additions & 2 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: 0 additions & 6 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: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Fields, Indices, Routing } from '@_types/common'
22+
import { KnnQuery } from './_types/Knn'
23+
24+
/**
25+
* @rest_spec_name knn_search
26+
* @since 7.16.0
27+
* @stability experimental
28+
*/
29+
export interface Request extends RequestBase {
30+
path_parts: {
31+
/**
32+
* A comma-separated list of index names to search;
33+
* use `_all` or empty string to perform the operation on all indices
34+
*/
35+
index: Indices
36+
}
37+
query_parameters: {
38+
/**
39+
* A comma-separated list of specific routing values
40+
*/
41+
routing?: Routing
42+
}
43+
body: {
44+
/**
45+
* Array of wildcard (*) patterns. The request returns values for field names
46+
* matching these patterns in the hits.fields property of the response.
47+
*/
48+
fields?: Fields
49+
/** KNN query to execute */
50+
knn: KnnQuery
51+
}
52+
}

0 commit comments

Comments
 (0)