Skip to content

File tree

45 files changed

+1160
-140
lines changed

Some content is hidden

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

45 files changed

+1160
-140
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/DeleteIndexPage.cs#L8-L16.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var deleteIndexResponse = client.DeleteIndex("twitter");
11+
----
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line433 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L320-L338.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var indexResponse1 = client.Index<object>(new { user_id = 12345 }, r => r.Index("users").Refresh(Refresh.WaitFor));
11+
12+
var indexResponse2 = client.Index<object>(new { user_id = 12346 }, r => r.Index("users").Refresh(Refresh.WaitFor));
13+
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line172 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L133-L168.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var putMappingResponse = client.Map<object>(m => m
11+
.Index("my_index")
12+
.Properties(pp => pp
13+
.Object<object>(o => o
14+
.Name("name")
15+
.Properties(p => p
16+
.Text(t => t.Name("last"))
17+
)
18+
)
19+
)
20+
);
21+
----
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line90 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L33-L41.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var putMappingResponse = client.Indices.Create("publications");
11+
----
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line352 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L266-L290.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var putMappingResponse = client.Map<object>(m => m
11+
.Index("my_index")
12+
.Properties(pp => pp
13+
.Keyword(k => k
14+
.Name("user_id")
15+
.IgnoreAbove(100)
16+
)
17+
)
18+
);
19+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line115 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L63-L91.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var createIndex1Response = client.Indices.Create("twitter-1");
11+
12+
var createIndex2Response = client.Indices.Create("twitter-2");
13+
14+
var putMappingResponse = client.Map<Tweet>(m => m
15+
.Index("twitter-1,twitter-2")
16+
.Properties(p =>
17+
p.Text(k => k.Name(t => t.UserName))
18+
)
19+
);
20+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line333 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L237-L264.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var createIndexResponse = client.Indices.Create("my_index", m => m
11+
.Map(m => m
12+
.Properties(pp => pp
13+
.Keyword(t => t
14+
.Name("user_id")
15+
.IgnoreAbove(20)
16+
)
17+
)
18+
)
19+
);
20+
----
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line192 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L170-L178.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var getMappingResponse = client.Indices.GetMapping<object>(r => r.Index("my_index"));
11+
----
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line471 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L367-L386.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var reindexOnServerResponse = client.ReindexOnServer(r => r
11+
.Source(s => s.Index("users"))
12+
.Destination(d => d.Index("new_users"))
13+
);
14+
----
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
////
2+
IMPORTANT NOTE
3+
==============
4+
This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/src/Examples/Examples/Indices/PutMappingPage.cs#L11-L31.
5+
If you wish to submit a PR to change this example, please change the source method above
6+
and run dotnet run -- asciidoc in the ExamplesGenerator project directory.
7+
////
8+
[source, csharp]
9+
----
10+
var putMappingResponse = client.Map<Tweet>(m => m
11+
.Index("twitter")
12+
.Properties(p =>
13+
p.Keyword(k => k.Name(t => t.Email))
14+
)
15+
);
16+
----

0 commit comments

Comments
 (0)