Skip to content

Commit b0abb7b

Browse files
committed
Add folder structure for helpers
1 parent 9f4b59b commit b0abb7b

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

docs/esql.asciidoc renamed to docs/helpers/esql.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[esql]]
2-
== ES|QL in the PHP client
2+
=== ES|QL in the PHP client
33
++++
4-
<titleabbrev>Using ES|QL</titleabbrev>
4+
<titleabbrev>ES|QL</titleabbrev>
55
++++
66

77
This page helps you understand and use {ref}/esql.html[ES|QL] in the

docs/helpers/index.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[[client-helpers]]
2+
== Client helpers
3+
4+
The PHP client comes with the following helpers:
5+
6+
* <<iterators>>
7+
* <<esql>>
8+
9+
include::iterators.asciidoc[]
10+
include::esql.asciidoc[]

docs/helpers.asciidoc renamed to docs/helpers/iterators.asciidoc

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
[[client-helpers]]
2-
== Client helpers
3-
4-
The client comes with helpers to give you a more comfortable experience with
5-
some APIs.
6-
7-
8-
[discrete]
91
[[iterators]]
102
=== Iterators
113

4+
The PHP client includes helpers for iterating through results by page or by hits.
125

13-
[discrete]
146
[[search-response-iterator]]
157
==== Search response iterator
168

17-
The `SearchResponseIterator` can be used to iterate page by page in a search
9+
Use the `SearchResponseIterator` to iterate page by page in a search
1810
result using
1911
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#paginate-search-results[pagination].
2012

21-
An example as follows:
13+
Here's an example:
2214

2315
[source,php]
2416
----
@@ -50,11 +42,11 @@ foreach($pages as $page) {
5042
[[search-hit-iterator]]
5143
==== Search hit iterator
5244

53-
The `SearchHitIterator` can be used to iterate in a `SearchResponseIterator`
45+
Use the `SearchHitIterator` to iterate in a `SearchResponseIterator`
5446
without worrying about
5547
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#paginate-search-results[pagination].
5648

57-
An example as follows:
49+
Here's an example:
5850

5951
[source,php]
6052
----
@@ -81,4 +73,4 @@ foreach($hits as $hit) {
8173
// e.g. prints the document id
8274
echo $hit['_id'], PHP_EOL;
8375
}
84-
----
76+
----

docs/index.asciidoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ include::configuration.asciidoc[]
2222

2323
include::operations.asciidoc[]
2424

25-
include::helpers.asciidoc[]
26-
27-
include::esql.asciidoc[]
25+
include::helpers/index.asciidoc[]
2826

2927
include::release-notes.asciidoc[]
3028

0 commit comments

Comments
 (0)