// 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: "tour",
  filter_path: "aggregations",
  aggregations: {
    path: {
      terms: {
        field: "city",
      },
      aggregations: {
        museum_tour: {
          geo_line: {
            point: {
              field: "location",
            },
            sort: {
              field: "@timestamp",
            },
          },
        },
      },
    },
  },
});
console.log(response);
----
