Skip to content

Commit adfac62

Browse files
committed
Minor edits
1 parent afd6f98 commit adfac62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+14935
-15
lines changed

docs/helpers/esql.asciidoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ There are two ways to use ES|QL in the PHP client:
1313
is the most flexible approach, but it's also the most complex because you must handle
1414
results in their raw form. You can choose the precise format of results,
1515
such as JSON, CSV, or text.
16-
* Use ES|QL `mapTo($class)` helper. This mapper take care of parsing the raw
16+
* Use ES|QL `mapTo($class)` helper. This mapper takes care of parsing the raw
1717
response and converting into an array of objects. If you don't specify the class
18-
using the `$class` parameter the mapping will use the https://www.php.net/manual/en/class.stdclass.php[stdClass]
19-
of PHP.
18+
using the `$class` parameter, the mapper uses https://www.php.net/manual/en/class.stdclass.php[stdClass].
2019

2120
[discrete]
2221
[[esql-how-to]]
@@ -28,10 +27,11 @@ results should be returned. You can choose a
2827
JSON, then fine-tune it with parameters like column separators
2928
and locale.
3029

31-
The default response from Elasticsearch is a table in JSON specified using `columns`
32-
as array of descriptions and `values` as array of rows with the values.
30+
The default response from Elasticsearch is a table in JSON, where `columns`
31+
is an array of descriptions and `values` is an array of rows containing the values.
3332

34-
An example is as follows:
33+
[[query-script]]
34+
Here's an example query and PHP script:
3535

3636
```php
3737
$query = <<<EOD
@@ -54,7 +54,7 @@ foreach ($result['values'] as $value) {
5454
}
5555
```
5656

57-
Given the following JSON response from Elasticsearch:
57+
Here's the JSON response from Elasticsearch:
5858

5959
```json
6060
{
@@ -96,7 +96,7 @@ Given the following JSON response from Elasticsearch:
9696
}
9797
```
9898

99-
The output of the revious PHP script is as follows:
99+
Using this response, the PHP script (provided <<query-script,above>>) produces the following output:
100100

101101
```php
102102
author : Stephen King
@@ -133,9 +133,9 @@ $result = $client->esql()->query([
133133
var_dump($result->asArray());
134134
```
135135

136-
The response will look something as follows:
136+
The response looks something like this:
137137

138-
```
138+
```json
139139
array(12) {
140140
[0]=>
141141
array(6) {
@@ -168,7 +168,7 @@ array(12) {
168168
string(4) "2002"
169169
}
170170
```
171-
where the first row is the column descriptions and the other rows contain
171+
In the response, the first row contains the column descriptions and the other rows contain
172172
the values, using a plain PHP array.
173173

174174

@@ -179,8 +179,8 @@ the values, using a plain PHP array.
179179
Although the `esql()->query()` API covers many use cases, your application
180180
might require a custom mapping.
181181

182-
You can map the ES|QL result into an array of object, using the `mapTo()`
183-
function, as follows:
182+
You can map the ES|QL result into an array of objects, using the `mapTo()`
183+
function. Here's an example:
184184

185185
```php
186186
$result = $client->esql()->query([
@@ -199,10 +199,10 @@ foreach ($books as $book) {
199199
}
200200
```
201201

202-
You can also specify the class name to be used for the mapping.
202+
You can also specify a class name for the mapping.
203203
All the values will be assigned to the properties of the class.
204204

205-
Here's an example mapper that returns an array of `Book` objects.
205+
Here's an example mapper that returns an array of `Book` objects:
206206

207207
```php
208208
class Book
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head>
4+
5+
<meta charset="UTF-8">
6+
<title>Reference – Endpoints | Elasticsearch-PHP | Elastic</title>
7+
<meta class="elastic" name="content" content="Reference – Endpoints | Elasticsearch-PHP">
8+
9+
<link rel="home" href="index.html" title="Elasticsearch-PHP"/>
10+
<link rel="up" href="index.html" title="Elasticsearch-PHP"/>
11+
<link rel="prev" href="quickstart.html" title="Quickstart"/>
12+
<meta class="elastic" name="product_version" content=""/>
13+
<meta class="elastic" name="product_name" content=""/>
14+
<meta class="elastic" name="website_area" content="documentation"/>
15+
<meta name="DC.type" content="Learn/Docs/"/>
16+
<meta name="DC.subject" content=""/>
17+
<meta name="DC.identifier" content=""/>
18+
19+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
20+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
21+
<meta name="viewport" content="width=device-width, initial-scale=1">
22+
<script src="https://cdn.optimizely.com/js/18132920325.js"></script>
23+
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
24+
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
25+
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
26+
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
27+
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
28+
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
29+
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
30+
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
31+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
32+
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
33+
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
34+
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
35+
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
36+
<link rel="manifest" href="/manifest.json">
37+
<meta name="apple-mobile-web-app-title" content="Elastic">
38+
<meta name="application-name" content="Elastic">
39+
<meta name="msapplication-TileColor" content="#ffffff">
40+
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
41+
<meta name="theme-color" content="#ffffff">
42+
<meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd" />
43+
<meta name="yandex-verification" content="d8a47e95d0972434" />
44+
<meta name="localized" content="true" />
45+
<meta name="st:robots" content="follow,index" />
46+
<meta property="og:image" content="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg" />
47+
<meta property="og:image:width" content="500" />
48+
<meta property="og:image:height" content="172" />
49+
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
50+
<link rel="icon" href="/favicon.ico" type="image/x-icon">
51+
<link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
52+
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
53+
<link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
54+
<!-- Give IE8 a fighting chance -->
55+
<!--[if lt IE 9]>
56+
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
57+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
58+
<![endif]-->
59+
<link rel="stylesheet" type="text/css" href="/guide/static/styles.css" />
60+
</head>
61+
62+
<!--© 2015-2022 Elasticsearch B.V. -->
63+
<!-- All Elastic documentation is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. -->
64+
<!-- http://creativecommons.org/licenses/by-nc-nd/4.0/ -->
65+
66+
<body>
67+
<!-- Google Tag Manager -->
68+
<script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
69+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
70+
<!-- End Google Tag Manager -->
71+
72+
<!-- Global site tag (gtag.js) - Google Analytics -->
73+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
74+
<script>
75+
window.dataLayer = window.dataLayer || [];
76+
function gtag(){dataLayer.push(arguments);}
77+
gtag('js', new Date());
78+
gtag('config', 'UA-12395217-16');
79+
</script>
80+
81+
<!-- Google Tag Manager for GA4 -->
82+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KNJMG2M');</script>
83+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNJMG2M" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
84+
<!-- End Google Tag Manager for GA4-->
85+
86+
<div id='elastic-nav' style="display:none;"></div>
87+
<script src='https://www.elastic.co/elastic-nav.js'></script>
88+
89+
<div class="main-container">
90+
<section id="content" >
91+
<div class="content-wrapper">
92+
93+
<section id="guide" lang="en">
94+
<div class="container-fluid">
95+
<div class="row pb-3">
96+
<div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col">
97+
<!-- The TOC is appended here -->
98+
</div>
99+
100+
<div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col">
101+
<!-- start body -->
102+
103+
<div id="content">
104+
<div class="breadcrumbs">
105+
<span class="breadcrumb-link"><a href="/guide/">Elastic Docs</a></span>
106+
<span class="chevron-right"></span><span class="breadcrumb-link"><a href="index.html">Elasticsearch-PHP</a></span>
107+
</div>
108+
<div class="navheader">
109+
<span class="prev">
110+
<a href="quickstart.html">« Quickstart</a>
111+
</span>
112+
<span class="next">
113+
</span>
114+
</div>
115+
<div class="chapter exclude">
116+
<div class="titlepage"><div><div>
117+
<h1 class="title"><a id="ElasticsearchPHP_Endpoints"></a>Reference – Endpoints<a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/elasticsearch-php/edit/master/docs/redirects.asciidoc">edit</a></h1>
118+
</div></div></div>
119+
<p>This page has been removed.</p>
120+
</div>
121+
<div class="navfooter">
122+
<span class="prev">
123+
<a href="quickstart.html">« Quickstart</a>
124+
</span>
125+
<span class="next">
126+
</span>
127+
</div>
128+
</div>
129+
130+
<!-- end body -->
131+
</div>
132+
133+
<div class="col-12 order-3 col-lg-2 order-lg-3 h-almost-full-lg sticky-top-lg" id="right_col">
134+
<div id="sticky_content">
135+
<!-- The OTP is appended here -->
136+
<div class="row">
137+
<div class="col-0 col-md-4 col-lg-0" id="bottom_left_col"></div>
138+
<div class="col-12 col-md-8 col-lg-12">
139+
<div id="rtpcontainer">
140+
<div class="mktg-promo" id="most-popular">
141+
<p class="aside-heading">Most Popular</p>
142+
<div class="pb-2">
143+
<p class="media-type">Video</p>
144+
<a href="https://www.elastic.co/webinars/getting-started-elasticsearch?page=docs&placement=top-video">
145+
<p class="mb-0">Get Started with Elasticsearch</p>
146+
</a>
147+
</div>
148+
<div class="pb-2">
149+
<p class="media-type">Video</p>
150+
<a href="https://www.elastic.co/webinars/getting-started-kibana?page=docs&placement=top-video">
151+
<p class="mb-0">Intro to Kibana</p>
152+
</a>
153+
</div>
154+
<div class="pb-2">
155+
<p class="media-type">Video</p>
156+
<a href="https://www.elastic.co/webinars/introduction-elk-stack?page=docs&placement=top-video">
157+
<p class="mb-0">ELK for Logs & Metrics</p>
158+
</a>
159+
</div>
160+
</div>
161+
</div>
162+
163+
<!-- Feedback widget -->
164+
<div id="feedbackWidgetContainer"></div>
165+
</div>
166+
</div>
167+
</div>
168+
</div>
169+
</div>
170+
</div>
171+
</section>
172+
173+
</div>
174+
175+
176+
<div id='elastic-footer'></div>
177+
<script src='https://www.elastic.co/elastic-footer.js'></script>
178+
<!-- Footer Section end-->
179+
180+
</section>
181+
</div>
182+
183+
<!-- Feedback modal -->
184+
<div id="feedbackModalContainer"></div>
185+
186+
<script src="/guide/static/jquery.js"></script>
187+
<script type="text/javascript" src="/guide/static/docs.js"></script>
188+
<script type="text/javascript">
189+
window.initial_state = {}</script>
190+
</body>
191+
</html>

0 commit comments

Comments
 (0)