1[[experimental_and_beta_apis]]
2=== Experimental and beta APIs
3
4The PHP client offers also `experimental` and `beta` APIs for {es}.
5
6The {es} APIs are marked using the following convention:
7
8- **Stable** APIs should be safe to use extensively in production. Any breaking
9  changes to these APIs should only occur in major versions and will be
10  documented in the breaking changes documentation for that release.
11- **Beta** APIs are on track to become stable and permanent features. Use them
12  with caution because it is possible that breaking changes are made to these
13  APIs in a minor version.
14- **Experimental** APIs are just that - an experiment. An experimental API might
15  have breaking changes in any future version, or it might even be removed
16  entirely.
17
18All the `experimental` and `beta` APIs are marked with a `@note` tag in the
19phpdoc section of the code.
20
21[discrete]
22=== Experimental
23
24The experimental APIs included in the current version of `elasticsearch-php`
25are:
26
27- https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-rank-eval.html[Ranking Evaluation]
28
29[source,php]
30----
31$client = ClientBuilder::create()->build();
32$params = [
33    // ...
34];
35$result = $client->rankEval($params);
36----
37
38- https://www.elastic.co/guide/en/elasticsearch/painless/7.4/painless-execute-api.html[Painless Execute]
39
40[source,php]
41----
42$client = ClientBuilder::create()->build();
43$params = [
44    // ...
45];
46$result = $client->scriptsPainlessExecute($params);
47----
48
49- Get Script Context
50
51Returns all script contexts.
52
53[source,php]
54----
55$client = ClientBuilder::create()->build();
56
57$result = $client->getScriptContext();
58----
59
60- Get Script Languages
61
62Returns available script types, languages and contexts.
63
64[source,php]
65----
66$client = ClientBuilder::create()->build();
67
68$result = $client->getScriptLanguages();
69----
70
71[discrete]
72=== Beta
73
74There are no beta APIs in the current version of `elasticsearch-php`.