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

[source, js]
----
const response = await client.search({
  index: "place",
  pretty: "true",
  suggest: {
    place_suggestion: {
      prefix: "tim",
      completion: {
        field: "suggest",
        size: 10,
        contexts: {
          place_type: [
            {
              context: "cafe",
            },
            {
              context: "restaurants",
              boost: 2,
            },
          ],
        },
      },
    },
  },
});
console.log(response);
----
