Skip to content

Commit f09bb26

Browse files
Fixed docs for put_script
Closes #132
1 parent 17a9a34 commit f09bb26

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/Search/Elasticsearch/Client/5_0/Direct.pm

+4-1
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,10 @@ The C<put_script()> method is used to store a script in the cluster state. For i
16381638
lang => 'painless',
16391639
id => 'hello_world',
16401640
body => {
1641-
script => q(return "hello world");
1641+
script => {
1642+
lang => 'painless',
1643+
source => q(return "hello world")
1644+
}
16421645
}
16431646
);
16441647

lib/Search/Elasticsearch/Client/6_0/Direct.pm

+4-2
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,10 @@ The C<put_script()> method is used to store a script in the cluster state. For i
14631463
$result = $e->put_scripts(
14641464
id => 'hello_world',
14651465
body => {
1466-
lang => 'painless',
1467-
source => q(return "hello world");
1466+
script => {
1467+
lang => 'painless',
1468+
source => q(return "hello world")
1469+
}
14681470
}
14691471
);
14701472

0 commit comments

Comments
 (0)