Skip to content

Commit 684112a

Browse files
committed
Fixed and updated doc examples
1 parent d4f24bc commit 684112a

File tree

172 files changed

+8131
-3780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+8131
-3780
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// docs/update.asciidoc:251
2+
3+
[source, php]
4+
----
5+
$params = [
6+
'index' => 'test',
7+
'id' => '1',
8+
'body' => [
9+
'doc' => [
10+
'name' => 'new_name',
11+
],
12+
'detect_noop' => false,
13+
],
14+
];
15+
$response = $client->update($params);
16+
----

docs/examples/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from source: aggregations/bucket/terms-aggregation.asciidoc:470
1+
// aggregations/bucket/terms-aggregation.asciidoc:470
22

33
[source, php]
44
----

docs/examples/033778305d52746f5ce0a2a922c8e521.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from source: aggregations/bucket/terms-aggregation.asciidoc:544
1+
// aggregations/bucket/terms-aggregation.asciidoc:544
22

33
[source, php]
44
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// query-dsl/multi-match-query.asciidoc:341
2+
3+
[source, php]
4+
----
5+
$params = [
6+
'body' => [
7+
'query' => [
8+
'multi_match' => [
9+
'query' => 'Will Smith',
10+
'type' => 'cross_fields',
11+
'fields' => [
12+
'first_name',
13+
'last_name',
14+
],
15+
'operator' => 'and',
16+
],
17+
],
18+
],
19+
];
20+
$response = $client->search($params);
21+
----

docs/examples/048d8abd42d094bbdcf4452a58ccb35b.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from source: docs/index_.asciidoc:486
1+
// docs/index_.asciidoc:486
22

33
[source, php]
44
----

docs/examples/06afce2955f9094d96d27067ebca32e8.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from source: query-dsl/bool-query.asciidoc:36
1+
// query-dsl/bool-query.asciidoc:36
22

33
[source, php]
44
----
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// indices/put-mapping.asciidoc:427
2+
3+
[source, php]
4+
----
5+
$params = [
6+
'index' => 'users',
7+
'body' => [
8+
'user_id' => 12345,
9+
],
10+
];
11+
$response = $client->index($params);
12+
$params = [
13+
'index' => 'users',
14+
'body' => [
15+
'user_id' => 12346,
16+
],
17+
];
18+
$response = $client->index($params);
19+
----
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// query-dsl/match-all-query.asciidoc:11
2+
3+
[source, php]
4+
----
5+
$params = [
6+
'body' => [
7+
'query' => [
8+
'match_all' => [
9+
],
10+
],
11+
],
12+
];
13+
$response = $client->search($params);
14+
----
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// docs/update.asciidoc:271
2+
3+
[source, php]
4+
----
5+
$params = [
6+
'index' => 'test',
7+
'id' => '1',
8+
'body' => [
9+
'script' => [
10+
'source' => 'ctx._source.counter += params.count',
11+
'lang' => 'painless',
12+
'params' => [
13+
'count' => 4,
14+
],
15+
],
16+
'upsert' => [
17+
'counter' => 1,
18+
],
19+
],
20+
];
21+
$response = $client->update($params);
22+
----

docs/examples/0ac9916f47a2483b89c1416684af322a.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from source: query-dsl/match-query.asciidoc:241
1+
// query-dsl/match-query.asciidoc:241
22

33
[source, php]
44
----

0 commit comments

Comments
 (0)