// 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",
  suggest: {
    text: "noble prize",
    simple_phrase: {
      phrase: {
        field: "title.trigram",
        size: 1,
        gram_size: 3,
        direct_generator: [
          {
            field: "title.trigram",
            suggest_mode: "always",
          },
        ],
        highlight: {
          pre_tag: "<em>",
          post_tag: "</em>",
        },
      },
    },
  },
});
console.log(response);
----
