// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.search({
  index: "amazon-reviews",
  retriever: {
    knn: {
      field: "review_vector",
      query_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
      k: 2,
      num_candidates: 5,
    },
  },
});
console.log(response);
----
