// 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: "obel prize",
    simple_phrase: {
      phrase: {
        field: "title.trigram",
        size: 1,
        direct_generator: [
          {
            field: "title.trigram",
            suggest_mode: "always",
          },
          {
            field: "title.reverse",
            suggest_mode: "always",
            pre_filter: "reverse",
            post_filter: "reverse",
          },
        ],
      },
    },
  },
});
console.log(response);
----
