// 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: "test-index",
  query: {
    nested: {
      path: "inference_field.inference.chunks",
      query: {
        knn: {
          field: "inference_field.inference.chunks.embeddings",
          query_vector_builder: {
            text_embedding: {
              model_id: "my_inference_id",
              model_text: "mountain lake",
            },
          },
        },
      },
    },
  },
});
console.log(response);
----
