Skip to content

Commit

Permalink
Update release-highlights.asciidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta authored Sep 20, 2024
1 parent e2912c3 commit 151adda
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/release-notes/release-highlights.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,57 @@ RangeQuery ra = RangeQuery.of(r -> r
.relation(RangeRelation.Contains)));
----

* Simplified builder for Script, removing the subclasses Stored and Inline. Example with UpdateRequest:

** Old InlineScript:
+
[source,java]
----
UpdateRequest updateRequest = UpdateRequest.of(u -> u
.script(s -> s
.inline(i -> i
.lang(ScriptLanguage.Painless)
.source("my-script")
.params(params)
)
)
);
----
** New Script
+
[source,java]
----
UpdateRequest updateRequest = UpdateRequest.of(u -> u
.script(s -> s
.lang(ScriptLanguage.Painless)
.source("my-script")
.params(params)
)
);
----
** Old StoredScript:
+
[source,java]
----
UpdateRequest updateRequest = UpdateRequest.of(u -> u
.script(s -> s
.stored(st -> st
.id("script-id")
)
)
);
----
** New Script
+
[source,java]
----
UpdateRequest updateRequest = UpdateRequest.of(u -> u
.script(s -> s
.id("script-id")
)
);
----

[discrete]
==== Version 8.14

Expand Down

0 comments on commit 151adda

Please sign in to comment.