// 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.index({
  index: "index_1",
  id: 1,
  document: {
    text: "Document in index 1",
  },
});
console.log(response);

const response1 = await client.index({
  index: "index_2",
  id: 2,
  refresh: "true",
  document: {
    text: "Document in index 2",
  },
});
console.log(response1);

const response2 = await client.search({
  index: "index_1,index_2",
  query: {
    terms: {
      _tier: ["data_hot", "data_warm"],
    },
  },
});
console.log(response2);
----
