-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d4bd65
commit adb4e9a
Showing
7 changed files
with
223 additions
and
4 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
docs/doc_examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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: "my-index-bit-vectors", | ||
query: { | ||
script_score: { | ||
query: { | ||
match_all: {}, | ||
}, | ||
script: { | ||
source: "dotProduct(params.query_vector, 'my_dense_vector')", | ||
params: { | ||
query_vector: [ | ||
0.23, 1.45, 3.67, 4.89, -0.56, 2.34, 3.21, 1.78, -2.45, 0.98, -0.12, | ||
3.45, 4.56, 2.78, 1.23, 0.67, 3.89, 4.12, -2.34, 1.56, 0.78, 3.21, | ||
4.12, 2.45, -1.67, 0.34, -3.45, 4.56, -2.78, 1.23, -0.67, 3.89, | ||
-4.34, 2.12, -1.56, 0.78, -3.21, 4.45, 2.12, 1.67, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
43 changes: 43 additions & 0 deletions
43
docs/doc_examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// 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: "my-index-000001", | ||
retriever: { | ||
rule: { | ||
match_criteria: { | ||
query_string: "puggles", | ||
user_country: "us", | ||
}, | ||
ruleset_ids: ["my-ruleset"], | ||
retriever: { | ||
rrf: { | ||
retrievers: [ | ||
{ | ||
standard: { | ||
query: { | ||
query_string: { | ||
query: "pugs", | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
standard: { | ||
query: { | ||
query_string: { | ||
query: "puggles", | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
52 changes: 52 additions & 0 deletions
52
docs/doc_examples/339c4e5af9f9069ad9912aa574488b59.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// 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-index-bit-vectors", | ||
mappings: { | ||
properties: { | ||
my_dense_vector: { | ||
type: "dense_vector", | ||
index: false, | ||
element_type: "bit", | ||
dims: 40, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
const response1 = await client.index({ | ||
index: "my-index-bit-vectors", | ||
id: 1, | ||
document: { | ||
my_dense_vector: [8, 5, -15, 1, -7], | ||
}, | ||
}); | ||
console.log(response1); | ||
const response2 = await client.index({ | ||
index: "my-index-bit-vectors", | ||
id: 2, | ||
document: { | ||
my_dense_vector: [-1, 115, -3, 4, -128], | ||
}, | ||
}); | ||
console.log(response2); | ||
const response3 = await client.index({ | ||
index: "my-index-bit-vectors", | ||
id: 3, | ||
document: { | ||
my_dense_vector: [2, 18, -5, 0, -124], | ||
}, | ||
}); | ||
console.log(response3); | ||
const response4 = await client.indices.refresh({ | ||
index: "my-index-bit-vectors", | ||
}); | ||
console.log(response4); | ||
---- |
23 changes: 23 additions & 0 deletions
23
docs/doc_examples/44198781d164a15be633d4469485a544.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// 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: "my-index-bit-vectors", | ||
query: { | ||
script_score: { | ||
query: { | ||
match_all: {}, | ||
}, | ||
script: { | ||
source: "dotProduct(params.query_vector, 'my_dense_vector')", | ||
params: { | ||
query_vector: [8, 5, -15, 1, -7], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
27 changes: 27 additions & 0 deletions
27
docs/doc_examples/828f0045747fde4888a947bb99e190e3.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 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: "movies", | ||
retriever: { | ||
rule: { | ||
match_criteria: { | ||
query_string: "harry potter", | ||
}, | ||
ruleset_ids: ["my-ruleset"], | ||
retriever: { | ||
standard: { | ||
query: { | ||
query_string: { | ||
query: "harry potter", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
42 changes: 42 additions & 0 deletions
42
docs/doc_examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// 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: "movies", | ||
retriever: { | ||
rule: { | ||
match_criteria: { | ||
query_string: "harry potter", | ||
}, | ||
ruleset_ids: ["my-ruleset"], | ||
retriever: { | ||
rrf: { | ||
retrievers: [ | ||
{ | ||
standard: { | ||
query: { | ||
query_string: { | ||
query: "sorcerer's stone", | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
standard: { | ||
query: { | ||
query_string: { | ||
query: "chamber of secrets", | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters