Files
elasticsearch-js/docs/doc_examples/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc
2024-07-29 17:10:05 -05:00

35 lines
632 B
Plaintext

// 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.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);
----