Skip to content

Commit 151adda

Browse files
authored
Update release-highlights.asciidoc
1 parent e2912c3 commit 151adda

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/release-notes/release-highlights.asciidoc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,57 @@ RangeQuery ra = RangeQuery.of(r -> r
4040
.relation(RangeRelation.Contains)));
4141
----
4242

43+
* Simplified builder for Script, removing the subclasses Stored and Inline. Example with UpdateRequest:
44+
45+
** Old InlineScript:
46+
+
47+
[source,java]
48+
----
49+
UpdateRequest updateRequest = UpdateRequest.of(u -> u
50+
.script(s -> s
51+
.inline(i -> i
52+
.lang(ScriptLanguage.Painless)
53+
.source("my-script")
54+
.params(params)
55+
)
56+
)
57+
);
58+
----
59+
** New Script
60+
+
61+
[source,java]
62+
----
63+
UpdateRequest updateRequest = UpdateRequest.of(u -> u
64+
.script(s -> s
65+
.lang(ScriptLanguage.Painless)
66+
.source("my-script")
67+
.params(params)
68+
)
69+
);
70+
----
71+
** Old StoredScript:
72+
+
73+
[source,java]
74+
----
75+
UpdateRequest updateRequest = UpdateRequest.of(u -> u
76+
.script(s -> s
77+
.stored(st -> st
78+
.id("script-id")
79+
)
80+
)
81+
);
82+
----
83+
** New Script
84+
+
85+
[source,java]
86+
----
87+
UpdateRequest updateRequest = UpdateRequest.of(u -> u
88+
.script(s -> s
89+
.id("script-id")
90+
)
91+
);
92+
----
93+
4394
[discrete]
4495
==== Version 8.14
4596

0 commit comments

Comments
 (0)