Skip to content

Commit 5a440ce

Browse files
committed
Switch index examples for current implementation
1 parent 09e08b2 commit 5a440ce

9 files changed

+59
-1
lines changed

examples/index/91.php renamed to examples/048d8abd42d094bbdcf4452a58ccb35b.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'id' => '1',
@@ -8,3 +10,4 @@
810
],
911
];
1012
$response = $client->create($params);
13+
----

examples/index/95.php renamed to examples/1f336ecc62480c1d56351cc2f82d0d08.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'id' => '1',
@@ -8,3 +10,4 @@
810
'version_type' => 'external',
911
];
1012
$response = $client->index($params);
13+
----

examples/index/92.php renamed to examples/36818c6d9f434d387819c30bd9addb14.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'body' => [
@@ -7,3 +9,4 @@
79
],
810
];
911
$response = $client->index($params);
12+
----

examples/index/93.php renamed to examples/625dc94df1f9affb49a082fd99d41620.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'body' => [
@@ -8,3 +10,4 @@
810
'routing' => 'kimchy',
911
];
1012
$response = $client->index($params);
13+
----
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[source,php]
2+
----
3+
$params = [
4+
'body' => [
5+
'persistent'=> [
6+
'action.auto_create_index' =>
7+
'twitter,index10,-index1*,+ind*' // <1>
8+
]
9+
]
10+
];
11+
$response = $client->cluser()->putSettings($params);
12+
13+
$params = [
14+
'body' => [
15+
'persistent'=> [
16+
'action.auto_create_index' => false // <2>
17+
]
18+
]
19+
];
20+
$response = $client->cluser()->putSettings($params);
21+
22+
$params = [
23+
'body' => [
24+
'persistent'=> [
25+
'action.auto_create_index' => true // <3>
26+
]
27+
]
28+
];
29+
$response = $client->cluser()->putSettings($params);
30+
----
31+
32+
<1> Permit only the auto-creation of indices called `twitter`, `index10`, no
33+
other index matching `index1*`, and any other index matching `ind*`. The
34+
patterns are matched in the order in which they are given.
35+
36+
<2> Completely disable the auto-creation of indices.
37+
38+
<3> Permit the auto-creation of indices with any name. This is the default.

examples/index/94.php renamed to examples/b918d6b798da673a33e49b94f61dcdc0.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'id' => '1',
@@ -9,3 +11,4 @@
911
'timeout' => '5m',
1012
];
1113
$response = $client->index($params);
14+
----

examples/index/88.php renamed to examples/bb143628fd04070683eeeadc9406d9cc.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'id' => '1',
@@ -8,3 +10,4 @@
810
],
911
];
1012
$response = $client->index($params);
13+
----

examples/index/90.php renamed to examples/d718b63cf1b6591a1d59a0cf4fd995eb.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[source,php]
2+
----
13
$params = [
24
'index' => 'twitter',
35
'id' => '1',
@@ -9,3 +11,4 @@
911
'op_type' => 'create',
1012
];
1113
$response = $client->index($params);
14+
----

examples/index/.ref

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)