Skip to content

Commit 8ca7f9f

Browse files
authored
Update formatting
This commit updates the formatting in line with asciidoctor
1 parent e3b6189 commit 8ca7f9f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

docs/elasticsearch-net/building-requests.asciidoc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Some endpoints need a request body which can be passed in a couple of ways
4141
var myJson = @"{ ""hello"" : ""world"" }";
4242
4343
client.Index("myindex","mytype","1", myJson);
44-
-----
44+
----
4545

4646
This will call `POST` on `/myindex/mytype/1` with the provided string `myJson` passed verbatim as the request body
4747

@@ -50,10 +50,8 @@ This will call `POST` on `/myindex/mytype/1` with the provided string `myJson` p
5050

5151
[source,csharp]
5252
----
53-
54-
var myJson = new { hello = "world" };
55-
client.Index("myindex","mytype","1", myJson);
56-
53+
var myJson = new { hello = "world" };
54+
client.Index("myindex","mytype","1", myJson);
5755
----
5856

5957
This will call `POST` on `/myindex/mytype/1` where `myJson` will be serialized by the registered `ISerializer`
@@ -79,18 +77,14 @@ In `Elasticsearch.Net` you can call these with
7977

8078
[source,csharp]
8179
----
82-
8380
var bulk = new object[]
8481
{
8582
new { index = new { _index = "test", _type="type", _id = "1" }},
8683
new { name = "my object's name" }
8784
};
8885
8986
client.Bulk(bulk);
90-
9187
----
9288

9389
`Elasticsearch.Net` will know not to serialize the passed object as `[]` but instead serialize each item seperately and join them up with `\n`.
9490
No request in Elasticsearch expects an array as the root object for the request.
95-
96-

0 commit comments

Comments
 (0)