31 lines
571 B
Plaintext
31 lines
571 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.indices.create({
|
|
index: "my-rank-vectors-byte",
|
|
mappings: {
|
|
properties: {
|
|
my_vector: {
|
|
type: "rank_vectors",
|
|
element_type: "byte",
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.index({
|
|
index: "my-rank-vectors-byte",
|
|
id: 1,
|
|
document: {
|
|
my_vector: [
|
|
[1, 2, 3],
|
|
[4, 5, 6],
|
|
],
|
|
},
|
|
});
|
|
console.log(response1);
|
|
----
|