Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-suhas authored Mar 20, 2024
1 parent f648f0b commit b989038
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/knn.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ const Query = require('./query');
*
* @example
* const qry = esb.kNN('my_field', 100, 1000).vector([1,2,3]);
* const qry = esb.kNN('my_field', 100, 1000).query_vector_builder('model_123', 'Sample model text');
* const qry = esb.kNN('my_field', 100, 1000).queryVectorBuilder('model_123', 'Sample model text');
*
* NOTE: kNN search was added to Elasticsearch in v8.0
*
* [Elasticsearch reference](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html)
*/
class KNN {
/**
* Creates an instance of KNN.
*/
// eslint-disable-next-line require-jsdoc

Check failure on line 20 in src/core/knn.js

View workflow job for this annotation

GitHub Actions / check (10.x)

Insert `·`

Check failure on line 20 in src/core/knn.js

View workflow job for this annotation

GitHub Actions / check (12.x)

Insert `·`

Check failure on line 20 in src/core/knn.js

View workflow job for this annotation

GitHub Actions / check (14.x)

Insert `·`
constructor(field, k, numCandidates) {
if (k > numCandidates)
throw new Error('KNN numCandidates cannot be less than k');
Expand Down

0 comments on commit b989038

Please sign in to comment.