|
| 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