// 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({
  query: {
    sparse_vector: {
      field: "ml.tokens",
      query_vector: {
        token1: 0.5,
        token2: 0.3,
        token3: 0.2,
      },
    },
  },
});
console.log(response);
----
