Skip to content

Commit

Permalink
Auto-generated code for 8.15 (#2424)
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Nov 4, 2024
1 parent 43175e1 commit 5d4bd65
Show file tree
Hide file tree
Showing 21 changed files with 387 additions and 77 deletions.
18 changes: 18 additions & 0 deletions docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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: "cooking_blog",
query: {
match: {
title: {
query: "fluffy pancakes breakfast",
minimum_should_match: 2,
},
},
},
});
console.log(response);
----
18 changes: 0 additions & 18 deletions docs/doc_examples/18de6782bd18f4a9baec2feec8c02a8b.asciidoc

This file was deleted.

55 changes: 55 additions & 0 deletions docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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: "cooking_blog",
query: {
bool: {
must: [
{
term: {
"category.keyword": "Main Course",
},
},
{
term: {
tags: "vegetarian",
},
},
{
range: {
rating: {
gte: 4.5,
},
},
},
],
should: [
{
multi_match: {
query: "curry spicy",
fields: ["title^2", "description"],
},
},
{
range: {
date: {
gte: "now-1M/d",
},
},
},
],
must_not: [
{
term: {
"category.keyword": "Dessert",
},
},
],
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const response = await client.indices.create({
properties: {
inference_field: {
type: "semantic_text",
inference_id: "my-elser-endpoint",
},
},
},
Expand Down
42 changes: 42 additions & 0 deletions docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
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.index({
index: "my-index-000001",
id: 1,
refresh: "true",
document: {
text: "quick brown fox",
},
});
console.log(response);
const response1 = await client.index({
index: "my-index-000001",
id: 2,
refresh: "true",
document: {
text: "quick fox",
},
});
console.log(response1);
const response2 = await client.search({
index: "my-index-000001",
query: {
script_score: {
query: {
match: {
text: "quick brown fox",
},
},
script: {
source: "_termStats.termFreq().getAverage()",
},
},
},
});
console.log(response2);
----
18 changes: 18 additions & 0 deletions docs/doc_examples/58dd26afc919722e21358c91e112b27a.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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: "cooking_blog",
query: {
range: {
date: {
gte: "2023-05-01",
lte: "2023-05-31",
},
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.indices.create({
index: "my-index-000003",
index: "my-index-000002",
mappings: {
properties: {
inference_field: {
Expand Down
18 changes: 18 additions & 0 deletions docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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: "cooking_blog",
query: {
match: {
description: {
query: "fluffy pancakes",
operator: "and",
},
},
},
});
console.log(response);
----
23 changes: 0 additions & 23 deletions docs/doc_examples/7a32f44a1511ecb0d3f0b0ff2aca5c44.asciidoc

This file was deleted.

17 changes: 17 additions & 0 deletions docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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: "cooking_blog",
query: {
match: {
description: {
query: "fluffy pancakes",
},
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

[source, js]
----
const response = await client.indices.putSettings({
index: "my-index-000001",
settings: {
"index.merge.policy.max_merge_at_once_explicit": null,
const response = await client.search({
index: "cooking_blog",
query: {
term: {
"author.keyword": "Maria Rodriguez",
},
},
});
console.log(response);
Expand Down
61 changes: 61 additions & 0 deletions docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// 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.putMapping({
index: "cooking_blog",
properties: {
title: {
type: "text",
analyzer: "standard",
fields: {
keyword: {
type: "keyword",
ignore_above: 256,
},
},
},
description: {
type: "text",
fields: {
keyword: {
type: "keyword",
},
},
},
author: {
type: "text",
fields: {
keyword: {
type: "keyword",
},
},
},
date: {
type: "date",
format: "yyyy-MM-dd",
},
category: {
type: "text",
fields: {
keyword: {
type: "keyword",
},
},
},
tags: {
type: "text",
fields: {
keyword: {
type: "keyword",
},
},
},
rating: {
type: "float",
},
},
});
console.log(response);
----
18 changes: 0 additions & 18 deletions docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc

This file was deleted.

21 changes: 21 additions & 0 deletions docs/doc_examples/aab810de3314d5e11bd564ea096785b8.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// 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: "cooking_blog",
query: {
bool: {
filter: [
{
term: {
"category.keyword": "Breakfast",
},
},
],
},
},
});
console.log(response);
----
16 changes: 16 additions & 0 deletions docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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: "cooking_blog",
query: {
multi_match: {
query: "vegetarian curry",
fields: ["title^3", "description^2", "tags"],
},
},
});
console.log(response);
----
Loading

0 comments on commit 5d4bd65

Please sign in to comment.