Skip to content

Commit 6172b14

Browse files
committed
Add UpdateForV10 annotation
1 parent 9d62ff9 commit 6172b14

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

compiler/src/model/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,9 @@ export function parseJsDocTags (jsDoc: JSDoc[]): Record<string, string> {
10741074
value: tag.getComment() ?? ''
10751075
}
10761076
})
1077-
const mapped = tags.reduce((acc, curr) => ({ ...acc, [curr.name]: curr.value }), {})
1077+
// Ignore UpdateForV10 which is only useful at the eslint level
1078+
const filteredTags = tags.filter(tag => tag.name != 'UpdateForV10')
1079+
const mapped = filteredTags.reduce((acc, curr) => ({ ...acc, [curr.name]: curr.value }), {})
10781080
return mapped
10791081
}
10801082

output/schema/schema.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/knn_search/KnnSearchRequest.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,8 @@ import { KnnSearchQuery } from './_types/Knn'
2828
*
2929
* NOTE: The kNN search API has been replaced by the `knn` option in the search API.
3030
*
31-
* Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents.
32-
* Given a query vector, the API finds the k closest vectors and returns those documents as search hits.
31+
* @UpdateForV10 Remove this API when it's no longer needed for compatibility mode with Elasticsearch 8 in rest-api-spec.
3332
*
34-
* Elasticsearch uses the HNSW algorithm to support efficient kNN search.
35-
* Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed.
36-
* This means the results returned are not always the true k closest neighbors.
37-
*
38-
* The kNN search API supports restricting the search using a filter.
39-
* The search will return the top k documents that also match the filter query.
40-
*
41-
* A kNN search response has the exact same structure as a search API response.
42-
* However, certain sections have a meaning specific to kNN search:
43-
*
44-
* * The document `_score` is determined by the similarity between the query and document vector.
45-
* * The `hits.total` object contains the total number of nearest neighbor candidates considered, which is `num_candidates * num_shards`. The `hits.total.relation` will always be `eq`, indicating an exact value.
4633
* @rest_spec_name knn_search
4734
* @availability stack since=8.0.0 stability=experimental visibility=private
4835
* @deprecated 8.4.0 The kNN search API has been replaced by the `knn` option in the search API.

0 commit comments

Comments
 (0)