// 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.asyncSearch.submit({
  index: "kibana_sample_data_ecommerce",
  size: 0,
  aggs: {
    my_agg: {
      frequent_item_sets: {
        minimum_set_size: 3,
        fields: [
          {
            field: "category.keyword",
          },
          {
            field: "geoip.city_name",
            exclude: "other",
          },
        ],
        size: 3,
      },
    },
  },
});
console.log(response);
----
