// 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: "my-index-000001",
  query: {
    bool: {
      should: [
        {
          percolate: {
            field: "query",
            document: {
              message: "bonsai tree",
            },
            name: "query1",
          },
        },
        {
          percolate: {
            field: "query",
            document: {
              message: "tulip flower",
            },
            name: "query2",
          },
        },
      ],
    },
  },
});
console.log(response);
----
