Skip to content

Commit 9b97aed

Browse files
author
unknown
committed
Align docs
1 parent 1687c0b commit 9b97aed

File tree

3 files changed

+28
-23
lines changed

3 files changed

+28
-23
lines changed

new_docs/contents/nest/core/delete-by-query.markdown

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,25 @@ menuitem: delete-by-query
1313
Elasticsearch allows you to delete over multiple types and indexes, so does NEST.
1414

1515
ConnectedClient.DeleteByQuery<ElasticSearchProject>(q => q
16-
.Indices(new[] {"index1", "index2"})
17-
.Query(rq => rq.Term(f => f.Name, "elasticsearch.pm"))
18-
);
16+
.Indices(new[] {"index1", "index2"})
17+
.Query(rq => rq.Term(f => f.Name, "elasticsearch.pm"))
18+
);
1919

2020
As always `*Async` variants are available too.
2121

2222
You can also delete by query over all the indices and types:
2323

2424
ConnectedClient.DeleteByQuery<ElasticSearchProject>(q => q
25-
.AllIndices()
26-
.Query(rq => rq.Term(f => f.Name, "elasticsearch.pm"))
27-
);
25+
.AllIndices()
26+
.Query(rq => rq.Term(f => f.Name, "elasticsearch.pm"))
27+
);
2828

2929
The DeleteByQuery can be further controlled by passing a `DeleteByQueryParameters` object
3030

31-
ConnectedClient.DeleteByQuery<object>(
32-
q => q.Query(rq => rq
33-
.Term(f => f.Name, "elasticsearch.pm"))
34-
.Routing("nest")
35-
.Replication(ReplicationOptions.Sync)
31+
ConnectedClient.DeleteByQuery<ElasticSearchProject>(q => q
32+
.Query(rq => rq
33+
.Term(f => f.Name, "elasticsearch.pm"))
34+
.Routing("nest")
35+
.Replication(ReplicationOptions.Sync)
36+
);
3637

new_docs/contents/nest/core/delete.markdown

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,27 @@ The delete API allows to delete a typed JSON document from a specific index base
1313

1414
## By Id
1515

16-
this.ConnectedClient.Delete<ElasticSearchProject>(searchProject.Id);
17-
this.ConnectedClient.DeleteAsync<ElasticSearchProject>(searchProject.Id);
16+
this.ConnectedClient.Delete<ElasticSearchProject>(searchProject.Id);
17+
this.ConnectedClient.DeleteAsync<ElasticSearchProject>(searchProject.Id);
1818

1919
## Delete with custom parameters
20-
IDeleteResponse result = _client.Delete(request.Id, descriptor => descriptor
21-
.Type("users")
22-
.Index("myindex"));
20+
21+
_client.Delete(request.Id, s => s
22+
.Type("users")
23+
.Index("myindex")
24+
);
2325

2426
## By object (T)
2527

2628
Id property is inferred (can be any value type (int, string, float ...))
2729

28-
this.ConnectedClient.Delete(searchProject);
29-
this.ConnectedClient.DeleteAsync(searchProject);
30+
this.ConnectedClient.Delete(searchProject);
31+
this.ConnectedClient.DeleteAsync(searchProject);
3032

3133
## By IEnumerable<T>
3234

33-
this.ConnectedClient.DeleteMany(searchProjects);
34-
this.ConnectedClient.DeleteManyAsync(searchProjects);
35+
this.ConnectedClient.DeleteMany(searchProjects);
36+
this.ConnectedClient.DeleteManyAsync(searchProjects);
3537

3638
## By IEnumerable<T> using bulkparameters
3739

new_docs/contents/nest/core/index.markdown

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ is sufficient. this will index post too `/[default index]/posts/12`. The typenam
2121

2222
If you need more control there are plenty of overloads, i.e:
2323

24-
IIndexResponse result = _client.Index(post, i => i.Index(index)
25-
.Type(type)
26-
.Id(post.Id));
24+
_client.Index(post, i => i
25+
.Index(index)
26+
.Type(type)
27+
.Id(post.Id)
28+
);
2729

2830
## Asynchronous
2931

0 commit comments

Comments
 (0)