You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/crud.asciidoc
+47-27Lines changed: 47 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,21 @@
1
1
[[indexing_documents]]
2
-
== Indexing Documents
2
+
== Indexing documents
3
3
4
-
IMPORTANT: Please note that mapping types will disappear from Elasticsearch, read more https://www.elastic.co/guide/en/elasticsearch/reference/7.x/removal-of-types.html[here]. If you migrated types from Elasticsearch 6 to 7, you can address these with the `type` param.
4
+
IMPORTANT: Please note that mapping types will disappear from {es}, read more
5
+
{ref-7x}/removal-of-types.html[here]. If you migrated types from {es} 6 to 7,
6
+
you can address these with the `type` param.
7
+
8
+
When you add documents to {es}, you index JSON documents. This maps naturally to
9
+
PHP associative arrays, since they can easily be encoded in JSON. Therefore, in
10
+
Elasticsearch-PHP you create and pass associative arrays to the client for
11
+
indexing. There are several methods of ingesting data into {es} which we cover
12
+
here.
5
13
6
-
When you add documents to Elasticsearch, you index JSON documents. This maps naturally to PHP associative arrays, since
7
-
they can easily be encoded in JSON. Therefore, in Elasticsearch-PHP you create and pass associative arrays to the client
8
-
for indexing. There are several methods of ingesting data into Elasticsearch, which we will cover here.
9
14
10
15
=== Single document indexing
11
16
12
-
When indexing a document, you can either provide an ID or let elasticsearch generate one for you.
17
+
When indexing a document, you can either provide an ID or let {es} generate one
If you need to set other parameters, such as a `routing` value, you specify those in the array alongside the `index`, etc. For example, let's set the routing and timestamp of this new document:
49
+
If you need to set other parameters, such as a `routing` value, you specify
50
+
those in the array alongside the `index`, and others. For example, let's set the
0 commit comments