diff --git a/docs/client-concepts/serialization/custom-serialization.asciidoc b/docs/client-concepts/serialization/custom-serialization.asciidoc index ce2ec664d1d..3ca00988e20 100644 --- a/docs/client-concepts/serialization/custom-serialization.asciidoc +++ b/docs/client-concepts/serialization/custom-serialization.asciidoc @@ -63,12 +63,9 @@ We want to serialize our source document using Pascal Casing for the JSON proper [source,csharp] ---- include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] -private async Task SerializeWithCustomOptionsAsync() -{ include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=custom-options-local-function] include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=create-client] include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=index-person] -} ---- <1> A local function can be defined, accepting a `JsonSerializerOptions` parameter. Here, we set `PropertyNamingPolicy` to `null`. This returns to the default behavior for `System.Text.Json`, which uses Pascal Case. <2> When creating the `ElasticsearchClientSettings`, we supply a `SourceSerializerFactory` using a lambda. The factory function creates a new instance of `DefaultSourceSerializer`, passing in the `settings` and our `ConfigureOptions` local function. We have now configured the settings with a custom instance of the source serializer. diff --git a/docs/usage/examples.asciidoc b/docs/usage/examples.asciidoc index a882f5db587..fe00ac06198 100644 --- a/docs/usage/examples.asciidoc +++ b/docs/usage/examples.asciidoc @@ -1,5 +1,5 @@ [[examples]] -=== CRUD usage examples +== CRUD usage examples This page helps you to understand how to perform various basic {es} CRUD (create, read, update, delete) operations using the .NET client. It demonstrates @@ -13,11 +13,7 @@ your C# file. [source,csharp] ---- -using System; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.QueryDsl; - -var client = new ElasticsearchClient(); <1> +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tags=using-directives;create-client] ---- <1> The default constructor, assumes an unsecured {es} server is running and exposed on 'http://localhost:9200'. See <> for examples @@ -30,13 +26,7 @@ that map to the document structure being stored in {es}. [source,csharp] ---- -public class Tweet -{ - public int Id { get; set; } <1> - public string User { get; set; } - public DateTime PostDate { get; set; } - public string Message { get; set; } -} +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=tweet-class] ---- <1> By default, the .NET client will try to find a property called `Id` on the class. When such a property is present it will index the document into {es} @@ -45,7 +35,7 @@ using the ID specified by the value of this property. [discrete] [[indexing-net]] -==== Indexing a document +=== Indexing a document Documents can be indexed by creating an instance representing a tweet and indexing it via the client. In these examples, we will work with an index named @@ -53,21 +43,7 @@ indexing it via the client. In these examples, we will work with an index named [source,csharp] ---- -var tweet = new Tweet <1> -{ - Id = 1, - User = "stevejgordon", - PostDate = new DateTime(2009, 11, 15), - Message = "Trying out the client, so far so good?" -}; - -var response = await client.IndexAsync(tweet, request => request.Index("my-tweet-index")); <2> - -if (response.IsValid) <3> -{ - Console.WriteLine($"Index document with ID {response.Id} succeeded."); <4> -} - +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=create-tweet] ---- <1> Create an instance of the `Tweet` class with relevant properties set. <2> Prefer the async APIs, which require awaiting the response. @@ -77,12 +53,11 @@ operation succeeded. [discrete] [[getting-net]] -==== Getting a document +=== Getting a document [source,csharp] ---- -var response = await client.GetAsync(1, idx => idx.Index("my-tweet-index")); <1> -var tweet = response.Source; <2> +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=get-tweet] ---- <1> The `GetResponse` is mapped 1-to-1 with the Elasticsearch JSON response. <2> The original document is deserialized as an instance of the Tweet class, @@ -91,25 +66,13 @@ accessible on the response via the `Source` property. [discrete] [[searching-net]] -==== Searching for documents +=== Searching for documents The client exposes a fluent interface and a powerful query DSL for searching. [source,csharp] ---- -var response = await client.SearchAsync(s => s <1> - .Index("my-tweet-index") <2> - .From(0) - .Size(10) - .Query(q => q - .Term(t => t.User, "stevejgordon") <3> - ) -); - -if (response.IsValid) -{ - var tweet = response.Documents.FirstOrDefault(); <4> -} +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=search-tweet-fluent] ---- <1> The generic type argument specifies the `Tweet` class, which is used when deserialising the hits from the response. @@ -126,19 +89,7 @@ aren't your thing. [source,csharp] ---- -var request = new SearchRequest("my-tweet-index") <1> -{ - From = 0, - Size = 10, - Query = new TermQuery("user") { Value = "stevejgordon" } -}; - -var response = await client.SearchAsync(request); <2> - -if (response.IsValid) -{ - var tweet = response.Documents.FirstOrDefault(); -} +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=search-tweet-object-initializer] ---- <1> Create an instance of `SearchRequest`, setting properties to control the search operation. @@ -146,22 +97,14 @@ search operation. [discrete] [[updating-net]] -==== Updating documents +=== Updating documents Documents can be updated in several ways, including by providing a complete replacement for an existing document ID. [source,csharp] ---- -tweet.Message = "This is a new message"; <1> - -var response = await client.UpdateAsync("my-tweet-index", 1, u => u - .Doc(tweet)); <2> - -if (response.IsValid) -{ - Console.WriteLine("Update document succeeded."); -} +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=update-tweet] ---- <1> Update a property on the existing tweet instance. <2> Send the updated tweet object in the update request. @@ -169,16 +112,11 @@ if (response.IsValid) [discrete] [[deleting-net]] -==== Deleting documents +=== Deleting documents Documents can be deleted by providing the ID of the document to remove. [source,csharp] ---- -var response = await client.DeleteAsync("my-tweet-index", 1); - -if (response.IsValid) -{ - Console.WriteLine("Delete document succeeded."); -} +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=delete-tweet] ---- \ No newline at end of file diff --git a/docs/usage/index.asciidoc b/docs/usage/index.asciidoc index 893806774ef..06bc4250ddd 100644 --- a/docs/usage/index.asciidoc +++ b/docs/usage/index.asciidoc @@ -1,6 +1,7 @@ [[usage]] -== Using the .NET Client += Using the .NET Client +[partintro] The sections below provide tutorials on the most frequently used and some less obvious features of {es}. For a full reference, see the {ref}/[Elasticsearch documentation] and in particular the {ref}/rest-apis.html[REST APIs] section. The {net-client} follows closely the JSON structures described there. diff --git a/docs/usage/recommendations.asciidoc b/docs/usage/recommendations.asciidoc index 70c01c87b5d..b7f02a3589c 100644 --- a/docs/usage/recommendations.asciidoc +++ b/docs/usage/recommendations.asciidoc @@ -1,11 +1,11 @@ [[recommendations]] -=== Usage recommendations +== Usage recommendations To achieve the most efficient use of the {net-client}, we recommend following the guidance defined in this article. [discrete] -==== Reuse the same client instance +=== Reuse the same client instance When working with the {net-client} we recommend that consumers reuse a single instance of `ElasticsearchClient` for the entire lifetime of the application. @@ -22,7 +22,7 @@ by creating a singleton static instance or by registering the type with a singleton lifetime when using dependency injection containers. [discrete] -==== Prefer asynchronous methods +=== Prefer asynchronous methods The {net-client} exposes synchronous and asynchronous methods on the `ElasticsearchClient`. We recommend always preferring the asynchronous methods, diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/09ecba5814d71e4c44468575eada9878.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/09ecba5814d71e4c44468575eada9878.asciidoc deleted file mode 100644 index 1d65ef49ccd..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/09ecba5814d71e4c44468575eada9878.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:214 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line214 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L81-L112. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .DateHistogram("sales_over_time", d => d - .Field("date") - .FixedInterval("30d") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/39a6a038c4b551022afe83de0523634e.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/39a6a038c4b551022afe83de0523634e.asciidoc deleted file mode 100644 index 6794d358df1..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/39a6a038c4b551022afe83de0523634e.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:636 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line636 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L359-L394. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .DateHistogram("sale_date", d => d - .Field("date") - .CalendarInterval(DateInterval.Year) - .Missing(new DateTime(2000, 1, 1)) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc deleted file mode 100644 index e3a474c9d41..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:669 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line669 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L396-L431. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .Terms("dayOfWeek", d => d - .Script(sc => sc - .Source("doc['date'].value.dayOfWeekEnum.value") - .Lang("painless") - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/70f0aa5853697e265ef3b1df72940951.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/70f0aa5853697e265ef3b1df72940951.asciidoc deleted file mode 100644 index 361fd5f2888..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/70f0aa5853697e265ef3b1df72940951.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:380 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line380 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L179-L230. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new -{ - date = "2015-10-01T00:30:00Z" -}, i => i.Index("my_index").Id(1).Refresh(Refresh.True)); - -var indexResponse2 = client.Index(new -{ - date = "2015-10-01T01:30:00Z" -}, i => i.Index("my_index").Id(2).Refresh(Refresh.True)); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Size(0) - .Aggregations(a => a - .DateHistogram("by_day", d => d - .Field("date") - .CalendarInterval(DateInterval.Day) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/73e5c88ad1488b213fb278ee1cb42289.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/73e5c88ad1488b213fb278ee1cb42289.asciidoc deleted file mode 100644 index 16c78602706..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/73e5c88ad1488b213fb278ee1cb42289.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:138 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line138 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L48-L79. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .DateHistogram("sales_over_time", d => d - .Field("date") - .CalendarInterval("2d") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc deleted file mode 100644 index c67b6fc7998..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:303 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line303 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L144-L177. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .DateHistogram("sales_over_time", d => d - .Field("date") - .CalendarInterval("1M") - .Format("yyyy-MM-dd") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/8de3206f80e18185a5ad6481f4c2ee07.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/8de3206f80e18185a5ad6481f4c2ee07.asciidoc deleted file mode 100644 index 8aa20e3a8f8..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/8de3206f80e18185a5ad6481f4c2ee07.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:431 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line431 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L232-L265. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Size(0) - .Aggregations(a => a - .DateHistogram("by_day", d => d - .Field("date") - .CalendarInterval(DateInterval.Day) - .TimeZone("-01:00") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc deleted file mode 100644 index efaa3b7ce2c..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:502 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line502 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L267-L320. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new -{ - date = "2015-10-01T05:30:00Z" -}, i => i.Index("my_index").Id(1).Refresh(Refresh.True)); - -var indexResponse2 = client.Index(new -{ - date = "2015-10-01T06:30:00Z" -}, i => i.Index("my_index").Id(2).Refresh(Refresh.True)); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Size(0) - .Aggregations(a => a - .DateHistogram("by_day", d => d - .Field("date") - .CalendarInterval(DateInterval.Day) - .Offset("+6h") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/DatehistogramAggregationPage/b789292f9cf63ce912e058c46d90ce20.asciidoc b/examples/Aggregations/Bucket/DatehistogramAggregationPage/b789292f9cf63ce912e058c46d90ce20.asciidoc deleted file mode 100644 index c9f2e8b0ac3..00000000000 --- a/examples/Aggregations/Bucket/DatehistogramAggregationPage/b789292f9cf63ce912e058c46d90ce20.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:119 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line119 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/DatehistogramAggregationPage.cs#L15-L46. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .DateHistogram("sales_over_time", d => d - .Field("date") - .CalendarInterval(DateInterval.Month) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/FilterAggregationPage/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc b/examples/Aggregations/Bucket/FilterAggregationPage/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc deleted file mode 100644 index 6d466e16cf9..00000000000 --- a/examples/Aggregations/Bucket/FilterAggregationPage/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// aggregations/bucket/filter-aggregation.asciidoc:9 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line9 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/FilterAggregationPage.cs#L13-L52. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .Filter("t_shirts", f => f - .Filter(q => q - .Term("type", "t-shirt") - ) - .Aggregations(aa => aa - .Average("avg_price", av => av - .Field("price") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc deleted file mode 100644 index 54a886ae5fa..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:336 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line336 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L279-L332. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("countries", t => t - .Field("artist.country") - .Order(o => o - .Descending("rock>playback_stats.avg") - .CountDescending() - ) - .Aggregations(aa => aa - .Filter("rock", f => f - .Filter(q => q - .Term("genre", "rock") - ) - .Aggregations(aaa => aaa - .Stats("playback_stats", st => st - .Field("play_count") - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/033778305d52746f5ce0a2a922c8e521.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/033778305d52746f5ce0a2a922c8e521.asciidoc deleted file mode 100644 index 8961731fbb6..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/033778305d52746f5ce0a2a922c8e521.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:410 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line410 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L363-L394. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Script(sc => sc - .Source("doc['genre'].value") - .Lang("painless") - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/0afaf1cad692e6201aa574c8feb6e622.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/0afaf1cad692e6201aa574c8feb6e622.asciidoc deleted file mode 100644 index a0d1868c943..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/0afaf1cad692e6201aa574c8feb6e622.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:492 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line492 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L468-L497. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("tags", t => t - .Field("tags") - .Include(".*sport.*") - .Exclude("water_.*") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/34efeade38445b2834749ced59782e25.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/34efeade38445b2834749ced59782e25.asciidoc deleted file mode 100644 index 29c1b9bd630..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/34efeade38445b2834749ced59782e25.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:263 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line263 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L179-L219. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - .Order(o => o - .Descending("playback_stats.max") - ) - .Aggregations(aa => aa - .Stats("playback_stats", m => m - .Field("play_count") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/35e8da9410b8432cf4095f2541ad7b1d.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/35e8da9410b8432cf4095f2541ad7b1d.asciidoc deleted file mode 100644 index 5831a90d54c..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/35e8da9410b8432cf4095f2541ad7b1d.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:162 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line162 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L38-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("products", t => t - .Field("product") - .Size(5) - .ShowTermDocCountError() - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/4646764bf09911fee7d58630c72d3137.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/4646764bf09911fee7d58630c72d3137.asciidoc deleted file mode 100644 index 299da3665e2..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/4646764bf09911fee7d58630c72d3137.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:444 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line444 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L396-L431. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Script(sc => sc - .Id("my_script") - .Params(p => p - .Add("field", "genre") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/527324766814561b75aaee853ede49a7.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/527324766814561b75aaee853ede49a7.asciidoc deleted file mode 100644 index eb3cdb686b4..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/527324766814561b75aaee853ede49a7.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:369 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line369 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L334-L361. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("tags", t => t - .Field("tags") - .MinimumDocumentCount(10) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc deleted file mode 100644 index 000261613f8..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:549 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line549 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L538-L593. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Size(0) - .Aggregations(a => a - .Terms("expired_sessions", t => t - .Field("account_id") - .Include(0, 20) - .Size(10000) - .Order(o => o - .Ascending("last_access") - ) - .Aggregations(aa => aa - .Max("last_access", m => m - .Field("access_date") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/6a4679531e64c492fce16dc12de6dcb0.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/6a4679531e64c492fce16dc12de6dcb0.asciidoc deleted file mode 100644 index d5c9fb747da..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/6a4679531e64c492fce16dc12de6dcb0.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:207 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line207 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L69-L101. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - .Order(o => o - .CountAscending() - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc deleted file mode 100644 index 7774a7feadb..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:243 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line243 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L137-L177. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - .Order(o => o - .Descending("max_play_count") - ) - .Aggregations(aa => aa - .Max("max_play_count", m => m - .Field("play_count") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/774d715155cd13713e6e327adf6ce328.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/774d715155cd13713e6e327adf6ce328.asciidoc deleted file mode 100644 index 642fe192058..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/774d715155cd13713e6e327adf6ce328.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:723 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line723 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L683-L710. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("tags", t => t - .Field("tags") - .ExecutionHint(TermsAggregationExecutionHint.Map) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc deleted file mode 100644 index 182091392e4..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:641 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line641 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L595-L636. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("actors", t => t - .Field("actors") - .Size(10) - .Aggregations(aa => aa - .Terms("costars", tt => tt - .Field("actors") - .Size(5) - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/93f1bdd72e79827dcf9a34efa02fd977.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/93f1bdd72e79827dcf9a34efa02fd977.asciidoc deleted file mode 100644 index 615bf0bb37e..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/93f1bdd72e79827dcf9a34efa02fd977.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:224 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line224 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L103-L135. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - .Order(o => o - .KeyAscending() - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/98b121bf47cebd85671a2cb519688d28.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/98b121bf47cebd85671a2cb519688d28.asciidoc deleted file mode 100644 index 981912b0560..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/98b121bf47cebd85671a2cb519688d28.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:520 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line520 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L499-L536. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("JapaneseCars", t => t - .Field("make") - .Include(new[] { "mazda", "honda" }) - ) - .Terms("ActiveCarManufacturers", t => t - .Field("make") - .Exclude(new[] { "rover", "jensen" }) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/9a8995fd31351045d99c78e40444c8ea.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/9a8995fd31351045d99c78e40444c8ea.asciidoc deleted file mode 100644 index fa9387f0267..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/9a8995fd31351045d99c78e40444c8ea.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:57 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line57 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L13-L36. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/a49169b4622918992411fab4ec48191b.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/a49169b4622918992411fab4ec48191b.asciidoc deleted file mode 100644 index c46b49ad712..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/a49169b4622918992411fab4ec48191b.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:466 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line466 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L433-L466. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("genres", t => t - .Field("genre") - .Script(sc => sc - .Source("'Genre: ' +_value") - .Lang("painless") - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc deleted file mode 100644 index 454a745d356..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:672 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line672 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L638-L681. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("actors", t => t - .Field("actors") - .Size(10) - .CollectMode(TermsAggregationCollectMode.BreadthFirst) - .Aggregations(aa => aa - .Terms("costars", tt => tt - .Field("actors") - .Size(5) - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc deleted file mode 100644 index c258c7aa381..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:309 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line309 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L221-L277. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("countries", t => t - .Field("artist.country") - .Order(o => o - .Descending("rock>playback_stats.avg") - ) - .Aggregations(aa => aa - .Filter("rock", f => f - .Filter(q => q - .Term("genre", "rock") - ) - .Aggregations(aaa => aaa - .Stats("playback_stats", st => st - .Field("play_count") - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Bucket/TermsAggregationPage/f085fb032dae56a3b104ab874eaea2ad.asciidoc b/examples/Aggregations/Bucket/TermsAggregationPage/f085fb032dae56a3b104ab874eaea2ad.asciidoc deleted file mode 100644 index 2671fbed0f9..00000000000 --- a/examples/Aggregations/Bucket/TermsAggregationPage/f085fb032dae56a3b104ab874eaea2ad.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:748 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line748 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Bucket/TermsAggregationPage.cs#L712-L739. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Aggregations(a => a - .Terms("tags", t => t - .Field("tags") - .Missing("N/A") - ) - ) -); ----- diff --git a/examples/Aggregations/Metrics/ValuecountAggregationPage/213ab768f1b6a895e09403a0880e259a.asciidoc b/examples/Aggregations/Metrics/ValuecountAggregationPage/213ab768f1b6a895e09403a0880e259a.asciidoc deleted file mode 100644 index 922ffc35a77..00000000000 --- a/examples/Aggregations/Metrics/ValuecountAggregationPage/213ab768f1b6a895e09403a0880e259a.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:65 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line65 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Metrics/ValuecountAggregationPage.cs#L76-L115. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .ValueCount("types_count", vc => vc - .Script(sc => sc - .Id("my_script") - .Params(p => p - .Add("field", "type") - ) - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Metrics/ValuecountAggregationPage/3722cb3705b6bc7f486969deace3dd83.asciidoc b/examples/Aggregations/Metrics/ValuecountAggregationPage/3722cb3705b6bc7f486969deace3dd83.asciidoc deleted file mode 100644 index 62879711591..00000000000 --- a/examples/Aggregations/Metrics/ValuecountAggregationPage/3722cb3705b6bc7f486969deace3dd83.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:46 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line46 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Metrics/ValuecountAggregationPage.cs#L41-L74. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .ValueCount("type_count", vc => vc - .Script(sc => sc - .Source("doc['type'].value") - ) - ) - ) -); ----- diff --git a/examples/Aggregations/Metrics/ValuecountAggregationPage/5dd695679b5141d9142d3d30ba8d300a.asciidoc b/examples/Aggregations/Metrics/ValuecountAggregationPage/5dd695679b5141d9142d3d30ba8d300a.asciidoc deleted file mode 100644 index c09b731fe6e..00000000000 --- a/examples/Aggregations/Metrics/ValuecountAggregationPage/5dd695679b5141d9142d3d30ba8d300a.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:13 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line13 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Metrics/ValuecountAggregationPage.cs#L14-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("sales") - .Size(0) - .Aggregations(a => a - .ValueCount("types_count", vc => vc - .Field("type") - ) - ) -); ----- diff --git a/examples/Aggregations/Metrics/ValuecountAggregationPage/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc b/examples/Aggregations/Metrics/ValuecountAggregationPage/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc deleted file mode 100644 index e066cf0bc2c..00000000000 --- a/examples/Aggregations/Metrics/ValuecountAggregationPage/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:96 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line96 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Aggregations/Metrics/ValuecountAggregationPage.cs#L117-L182. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new Dictionary -{ - ["network.name"] = "net-1", - ["latency_histo"] = new - { - values = new[] { 0.1, 0.2, 0.3, 0.4, 0.5 }, - counts = new[] { 3, 7, 23, 12, 6 } - } -}, i => i.Index("metrics_index").Id(1)); - -var indexResponse2 = client.Index(new Dictionary -{ - ["network.name"] = "net-2", - ["latency_histo"] = new - { - values = new[] { 0.1, 0.2, 0.3, 0.4, 0.5 }, - counts = new[] { 8, 17, 8, 7, 6 } - } -}, i => i.Index("metrics_index").Id(2)); - -var searchResponse = client.Search(s => s - .Index("metrics_index") - .Size(0) - .Aggregations(a => a - .ValueCount("total_requests", vc => vc - .Field("latency_histo") - ) - ) -); ----- diff --git a/examples/Cat/HealthPage/ccd9e2cf7181de67cf9ab0df1a02c575.asciidoc b/examples/Cat/HealthPage/ccd9e2cf7181de67cf9ab0df1a02c575.asciidoc deleted file mode 100644 index f620b562d03..00000000000 --- a/examples/Cat/HealthPage/ccd9e2cf7181de67cf9ab0df1a02c575.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// cat/health.asciidoc:89 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line89 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cat/HealthPage.cs#L23-L32. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var catResponse = client.Cat.Health(h => h.Verbose().IncludeTimestamp(false)); ----- diff --git a/examples/Cat/HealthPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc b/examples/Cat/HealthPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc deleted file mode 100644 index cef3430a3e8..00000000000 --- a/examples/Cat/HealthPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// cat/health.asciidoc:69 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line69 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cat/HealthPage.cs#L12-L21. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var catResponse = client.Cat.Health(h => h.Verbose()); ----- diff --git a/examples/Cat/IndicesPage/073539a7e38be3cdf13008330b6a536a.asciidoc b/examples/Cat/IndicesPage/073539a7e38be3cdf13008330b6a536a.asciidoc deleted file mode 100644 index e96860ec922..00000000000 --- a/examples/Cat/IndicesPage/073539a7e38be3cdf13008330b6a536a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// cat/indices.asciidoc:100 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line100 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cat/IndicesPage.cs#L13-L26. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var catResponse = client.Cat.Indices(c => c - .Index("twi*") - .Verbose() - .SortByColumns("index") -); ----- diff --git a/examples/Cluster/HealthPage/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc b/examples/Cluster/HealthPage/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc deleted file mode 100644 index 6f2274d0ff4..00000000000 --- a/examples/Cluster/HealthPage/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// cluster/health.asciidoc:36 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line36 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cluster/HealthPage.cs#L14-L26. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var healthResponse = client.Cluster.Health(selector: h => h - .WaitForStatus(WaitForStatus.Yellow) - .Timeout("50s") -); ----- diff --git a/examples/Cluster/HealthPage/b02e4907c9936c1adc16ccce9d49900d.asciidoc b/examples/Cluster/HealthPage/b02e4907c9936c1adc16ccce9d49900d.asciidoc deleted file mode 100644 index 3505f6b2684..00000000000 --- a/examples/Cluster/HealthPage/b02e4907c9936c1adc16ccce9d49900d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// cluster/health.asciidoc:150 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line150 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cluster/HealthPage.cs#L28-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var healthResponse = client.Cluster.Health(); ----- diff --git a/examples/Cluster/HealthPage/c48264ec5d9b9679fddd72e5c44425b9.asciidoc b/examples/Cluster/HealthPage/c48264ec5d9b9679fddd72e5c44425b9.asciidoc deleted file mode 100644 index e459dcaeee6..00000000000 --- a/examples/Cluster/HealthPage/c48264ec5d9b9679fddd72e5c44425b9.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// cluster/health.asciidoc:186 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line186 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Cluster/HealthPage.cs#L39-L50. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var healthResponse = client.Cluster.Health("twitter", h => h - .Level(Level.Shards) -); ----- diff --git a/examples/Docs/BulkPage/8cd00a3aba7c3c158277bc032aac2830.asciidoc b/examples/Docs/BulkPage/8cd00a3aba7c3c158277bc032aac2830.asciidoc deleted file mode 100644 index 42b0f0b51b1..00000000000 --- a/examples/Docs/BulkPage/8cd00a3aba7c3c158277bc032aac2830.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -// docs/bulk.asciidoc:545 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line545 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/BulkPage.cs#L51-L117. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var bulkResponse = client.Bulk(b => b - .Update(u => u - .Index("index1") - .Id("1") - .RetriesOnConflict(3) - .Doc(new { field = "value" }) - ) - .Update(u => u - .Index("index1") - .Id("0") - .RetriesOnConflict(3) - .Script(s => s - .Source("ctx._source.counter += params.param1") - .Lang("painless") - .Params(d => d - .Add("param1", 1) - ) - ) - .Upsert(new { counter = 1 }) - ) - .Update(u => u - .Index("index1") - .Id("2") - .RetriesOnConflict(3) - .Doc(new { field = "value" }) - .DocAsUpsert(true) - ) - .Update(u => u - .Index("index1") - .Id("3") - .Source(true) - .Doc(new { field = "value" }) - ) - .Update(u => u - .Index("index1") - .Id("4") - .Source(true) - .Doc(new { field = "value" }) - ) -); ----- diff --git a/examples/Docs/BulkPage/ae9ccfaa146731ab9176df90670db1c2.asciidoc b/examples/Docs/BulkPage/ae9ccfaa146731ab9176df90670db1c2.asciidoc deleted file mode 100644 index 579fd302f1c..00000000000 --- a/examples/Docs/BulkPage/ae9ccfaa146731ab9176df90670db1c2.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -// docs/bulk.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/BulkPage.cs#L13-L49. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var bulkResponse = client.Bulk(b => b - .Index(i => i - .Index("test") - .Id("1") - .Document(new { field1 = "value1" }) - ) - .Delete(d => d - .Index("test") - .Id("2") - ) - .Create(c => c - .Index("test") - .Id("3") - .Document(new { field1 = "value3" }) - ) - .Update(u => u - .Index("test") - .Id("1") - .Doc(new { field2 = "value2" }) - ) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/14701dcc0cca9665fce2aace0cb62af7.asciidoc b/examples/Docs/DeleteByQueryPage/14701dcc0cca9665fce2aace0cb62af7.asciidoc deleted file mode 100644 index 7f1f46eafec..00000000000 --- a/examples/Docs/DeleteByQueryPage/14701dcc0cca9665fce2aace0cb62af7.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// docs/delete-by-query.asciidoc:511 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line511 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L324-L361. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Size(0) - .FilterPath(new[] { "hits.total" }) //<1> - .Query(q => q - .Range(r => r - .Field(f => f.Likes) - .LessThan(10) - ) - ) -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Docs/DeleteByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc b/examples/Docs/DeleteByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc deleted file mode 100644 index a4ab231cc15..00000000000 --- a/examples/Docs/DeleteByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/delete-by-query.asciidoc:667 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line667 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L402-L413. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var cancelTaskResponse = client.Tasks.Cancel(t => t - .TaskId("r1A2WoRbTwKZ516z6NEs5A:36619") -); ----- diff --git a/examples/Docs/DeleteByQueryPage/1e49eba5b9042c1900a608fe5105ba43.asciidoc b/examples/Docs/DeleteByQueryPage/1e49eba5b9042c1900a608fe5105ba43.asciidoc deleted file mode 100644 index 5f5e38c7052..00000000000 --- a/examples/Docs/DeleteByQueryPage/1e49eba5b9042c1900a608fe5105ba43.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -// docs/delete-by-query.asciidoc:421 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line421 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L158-L235. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .Slice(s => s - .Id(0) - .Max(2) - ) - .Query(q => q - .Range(r => r - .Field(f => f.Likes) - .LessThan(10) - ) - ) -); - -var deleteByQueryResponse2 = client.DeleteByQuery(d => d - .Index("twitter") - .Slice(s => s - .Id(1) - .Max(2) - ) - .Query(q => q - .Range(r => r - .Field(f => f.Likes) - .LessThan(10) - ) - ) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/216848930c2d344fe0bed0daa70c35b9.asciidoc b/examples/Docs/DeleteByQueryPage/216848930c2d344fe0bed0daa70c35b9.asciidoc deleted file mode 100644 index 087c605b1d4..00000000000 --- a/examples/Docs/DeleteByQueryPage/216848930c2d344fe0bed0daa70c35b9.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/delete-by-query.asciidoc:593 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line593 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L377-L389. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var listTasksResponse = client.Tasks.List(t => t - .Detailed() - .Actions("*/delete/byquery") -); ----- diff --git a/examples/Docs/DeleteByQueryPage/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc b/examples/Docs/DeleteByQueryPage/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc deleted file mode 100644 index a1428f56f08..00000000000 --- a/examples/Docs/DeleteByQueryPage/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// docs/delete-by-query.asciidoc:456 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line456 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L237-L283. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var refreshResponse = client.Indices.Refresh(); - -var searchResponse = client.Search(s => s - .Index("twitter") - .Size(0) - .FilterPath(new[] { "hits.total" }) //<1> - .Query(q => q - .Range(r => r - .Field(f => f.Likes) - .LessThan(10) - ) - ) -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Docs/DeleteByQueryPage/52c7e4172a446c394210a07c464c57d2.asciidoc b/examples/Docs/DeleteByQueryPage/52c7e4172a446c394210a07c464c57d2.asciidoc deleted file mode 100644 index 9cf1a7ee67d..00000000000 --- a/examples/Docs/DeleteByQueryPage/52c7e4172a446c394210a07c464c57d2.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/delete-by-query.asciidoc:579 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line579 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L363-L375. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var rethrottleResponse = client.DeleteByQueryRethrottle("r1A2WoRbTwKZ516z6NEs5A:36619", - r => r - .RequestsPerSecond(-1) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/a5a7050fb9dcb9574e081957ade28617.asciidoc b/examples/Docs/DeleteByQueryPage/a5a7050fb9dcb9574e081957ade28617.asciidoc deleted file mode 100644 index 4aaee1e81f0..00000000000 --- a/examples/Docs/DeleteByQueryPage/a5a7050fb9dcb9574e081957ade28617.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// docs/delete-by-query.asciidoc:494 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line494 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L285-L322. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .Refresh() - .Slices(5) - .Query(q => q - .Range(r => r - .Field(f => f.Likes) - .LessThan(10) - ) - ) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc b/examples/Docs/DeleteByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc deleted file mode 100644 index 80ff8069e17..00000000000 --- a/examples/Docs/DeleteByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/delete-by-query.asciidoc:647 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line647 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L391-L400. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getTaskResponse = client.Tasks.GetTask("r1A2WoRbTwKZ516z6NEs5A:36619"); ----- diff --git a/examples/Docs/DeleteByQueryPage/c22b72c4a52ee098331b3f252c22860d.asciidoc b/examples/Docs/DeleteByQueryPage/c22b72c4a52ee098331b3f252c22860d.asciidoc deleted file mode 100644 index 721c7f05c93..00000000000 --- a/examples/Docs/DeleteByQueryPage/c22b72c4a52ee098331b3f252c22860d.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/delete-by-query.asciidoc:369 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line369 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L69-L86. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter,blog") - .Query(q => q.MatchAll()) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc b/examples/Docs/DeleteByQueryPage/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc deleted file mode 100644 index b1739b77138..00000000000 --- a/examples/Docs/DeleteByQueryPage/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/delete-by-query.asciidoc:383 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line383 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L88-L122. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .Routing(1) - .Query(q => q - .Range(r => r - .Field(f => f.Age) - .GreaterThanOrEquals(10) - ) - ) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/dfb1fe96d806a644214d06f9b4b87878.asciidoc b/examples/Docs/DeleteByQueryPage/dfb1fe96d806a644214d06f9b4b87878.asciidoc deleted file mode 100644 index 7b74570763e..00000000000 --- a/examples/Docs/DeleteByQueryPage/dfb1fe96d806a644214d06f9b4b87878.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/delete-by-query.asciidoc:401 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line401 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L124-L156. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .ScrollSize(5000) - .Query(q => q - .Term(r => r - .Field(f => f.User) - .Value("kimchy") - ) - ) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc b/examples/Docs/DeleteByQueryPage/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc deleted file mode 100644 index b54ba200840..00000000000 --- a/examples/Docs/DeleteByQueryPage/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/delete-by-query.asciidoc:356 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line356 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L49-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .Conflicts(Conflicts.Proceed) - .Query(q => q.MatchAll()) -); ----- diff --git a/examples/Docs/DeleteByQueryPage/ebb6b59fbc9325c17e45f524602d6be2.asciidoc b/examples/Docs/DeleteByQueryPage/ebb6b59fbc9325c17e45f524602d6be2.asciidoc deleted file mode 100644 index f1685c5c4d3..00000000000 --- a/examples/Docs/DeleteByQueryPage/ebb6b59fbc9325c17e45f524602d6be2.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// docs/delete-by-query.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeleteByQueryPage.cs#L15-L47. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteByQueryResponse = client.DeleteByQuery(d => d - .Index("twitter") - .Query(q => q - .Match(m => m - .Field(f => f.Message) - .Query("some message") - ) - ) -); ----- diff --git a/examples/Docs/DeletePage/47b5ff897f26e9c943cee5c06034181d.asciidoc b/examples/Docs/DeletePage/47b5ff897f26e9c943cee5c06034181d.asciidoc deleted file mode 100644 index 3b8ffcc0009..00000000000 --- a/examples/Docs/DeletePage/47b5ff897f26e9c943cee5c06034181d.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/delete.asciidoc:75 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line75 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeletePage.cs#L14-L26. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteResponse = client.Delete(1, d => d - .Index("twitter") - .Routing("kimchy") -); ----- diff --git a/examples/Docs/DeletePage/c5e5873783246c7b1c01d8464fed72c4.asciidoc b/examples/Docs/DeletePage/c5e5873783246c7b1c01d8464fed72c4.asciidoc deleted file mode 100644 index 3a31431fb0a..00000000000 --- a/examples/Docs/DeletePage/c5e5873783246c7b1c01d8464fed72c4.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/delete.asciidoc:172 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line172 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeletePage.cs#L41-L50. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteResponse = client.Delete(1, d => d.Index("twitter")); ----- diff --git a/examples/Docs/DeletePage/d90a84a24a407731dfc1929ac8327746.asciidoc b/examples/Docs/DeletePage/d90a84a24a407731dfc1929ac8327746.asciidoc deleted file mode 100644 index eeb25ea6ad5..00000000000 --- a/examples/Docs/DeletePage/d90a84a24a407731dfc1929ac8327746.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/delete.asciidoc:131 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line131 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/DeletePage.cs#L28-L40. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteResponse = client.Delete(1, d => d - .Index("twitter") - .Timeout("5m") -); ----- diff --git a/examples/Docs/GetPage/0ba0b2db24852abccb7c0fc1098d566e.asciidoc b/examples/Docs/GetPage/0ba0b2db24852abccb7c0fc1098d566e.asciidoc deleted file mode 100644 index 964be0e0c5c..00000000000 --- a/examples/Docs/GetPage/0ba0b2db24852abccb7c0fc1098d566e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// docs/get.asciidoc:366 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line366 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L208-L229. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - Counter = 1, - Tags = new[] { "white" } -}, i => i -.Index("twitter") -.Id(2) -.Routing("user1") -); ----- diff --git a/examples/Docs/GetPage/138ccd89f72aa7502dd9578403dcc589.asciidoc b/examples/Docs/GetPage/138ccd89f72aa7502dd9578403dcc589.asciidoc deleted file mode 100644 index 80dfaf7adb8..00000000000 --- a/examples/Docs/GetPage/138ccd89f72aa7502dd9578403dcc589.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/get.asciidoc:53 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line53 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L25-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(0, g => g - .Index("twitter") - .SourceEnabled(false) -); ----- diff --git a/examples/Docs/GetPage/1d65cb6d055c46a1bde809687d835b71.asciidoc b/examples/Docs/GetPage/1d65cb6d055c46a1bde809687d835b71.asciidoc deleted file mode 100644 index 77ea52e382e..00000000000 --- a/examples/Docs/GetPage/1d65cb6d055c46a1bde809687d835b71.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/get.asciidoc:86 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line86 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L72-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(2, g => g - .Index("twitter") - .Routing("user1") -); ----- diff --git a/examples/Docs/GetPage/2468ab381257d759d8a88af1141f6f9c.asciidoc b/examples/Docs/GetPage/2468ab381257d759d8a88af1141f6f9c.asciidoc deleted file mode 100644 index 711ae9b9fdf..00000000000 --- a/examples/Docs/GetPage/2468ab381257d759d8a88af1141f6f9c.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/get.asciidoc:288 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line288 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L123-L132. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var sourceExistsResponse = client.SourceExists(1, s => s.Index("twitter")); ----- diff --git a/examples/Docs/GetPage/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc b/examples/Docs/GetPage/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc deleted file mode 100644 index cacdebbcbb6..00000000000 --- a/examples/Docs/GetPage/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/get.asciidoc:323 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line323 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L173-L190. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - Counter = 1, - Tags = new[] { "red" } -}, i => i.Index("twitter").Id(1)); ----- diff --git a/examples/Docs/GetPage/69a7be47f85138b10437113ab2f0d72d.asciidoc b/examples/Docs/GetPage/69a7be47f85138b10437113ab2f0d72d.asciidoc deleted file mode 100644 index fe5e7648e47..00000000000 --- a/examples/Docs/GetPage/69a7be47f85138b10437113ab2f0d72d.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// docs/get.asciidoc:376 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line376 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L231-L246. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(2, g => g - .Index("twitter") - .Routing("user1") - .StoredFields( - f => f.Tags, - f => f.Counter) -); ----- diff --git a/examples/Docs/GetPage/710c7871f20f176d51209b1574b0d61b.asciidoc b/examples/Docs/GetPage/710c7871f20f176d51209b1574b0d61b.asciidoc deleted file mode 100644 index 1241a28f9b2..00000000000 --- a/examples/Docs/GetPage/710c7871f20f176d51209b1574b0d61b.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/get.asciidoc:335 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line335 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L192-L206. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(1, g => g - .Index("twitter") - .StoredFields( - f => f.Tags, - f => f.Counter) -); ----- diff --git a/examples/Docs/GetPage/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc b/examples/Docs/GetPage/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc deleted file mode 100644 index 0ff084e25e2..00000000000 --- a/examples/Docs/GetPage/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/get.asciidoc:73 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line73 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L54-L70. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(0, g => g - .Index("twitter") - .SourceIncludes("*.id,retweeted") -); ----- diff --git a/examples/Docs/GetPage/89a8ac1509936acc272fc2d72907bc45.asciidoc b/examples/Docs/GetPage/89a8ac1509936acc272fc2d72907bc45.asciidoc deleted file mode 100644 index d5302942df9..00000000000 --- a/examples/Docs/GetPage/89a8ac1509936acc272fc2d72907bc45.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/get.asciidoc:269 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line269 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L97-L106. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var sourceResponse = client.Source(1, s => s.Index("twitter")); ----- diff --git a/examples/Docs/GetPage/8fdf2344c4fb3de6902ad7c5735270df.asciidoc b/examples/Docs/GetPage/8fdf2344c4fb3de6902ad7c5735270df.asciidoc deleted file mode 100644 index 36c55c63df7..00000000000 --- a/examples/Docs/GetPage/8fdf2344c4fb3de6902ad7c5735270df.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/get.asciidoc:65 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line65 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L39-L52. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(0, g => g - .Index("twitter") - .SourceIncludes("*.id") - .SourceExcludes("entities") -); ----- diff --git a/examples/Docs/GetPage/913770050ebbf3b9b549a899bc11060a.asciidoc b/examples/Docs/GetPage/913770050ebbf3b9b549a899bc11060a.asciidoc deleted file mode 100644 index 1ec5d951423..00000000000 --- a/examples/Docs/GetPage/913770050ebbf3b9b549a899bc11060a.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// docs/get.asciidoc:302 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line302 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L134-L171. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("twitter", c => c - .Map(m => m - .Properties(p => p - .Number(n => n - .Name(f => f.Counter) - .Type(NumberType.Integer) - .Store(false) - ) - .Keyword(k => k - .Name(f => f.Tags) - .Store(true) - ) - ) - ) -); ----- diff --git a/examples/Docs/GetPage/98234499cfec70487cec5d013e976a84.asciidoc b/examples/Docs/GetPage/98234499cfec70487cec5d013e976a84.asciidoc deleted file mode 100644 index 4d97c7c069a..00000000000 --- a/examples/Docs/GetPage/98234499cfec70487cec5d013e976a84.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/get.asciidoc:253 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line253 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L86-L95. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var existsResponse = client.DocumentExists(0, g => g.Index("twitter")); ----- diff --git a/examples/Docs/GetPage/d222c6a6ec7a3beca6c97011b0874512.asciidoc b/examples/Docs/GetPage/d222c6a6ec7a3beca6c97011b0874512.asciidoc deleted file mode 100644 index f8d87e094db..00000000000 --- a/examples/Docs/GetPage/d222c6a6ec7a3beca6c97011b0874512.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/get.asciidoc:278 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line278 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L108-L121. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var sourceFilteringResponse = client.Source(1, s => s - .Index("twitter") - .SourceIncludes("*.id") - .SourceExcludes("entities") -); ----- diff --git a/examples/Docs/GetPage/fbcf5078a6a9e09790553804054c36b3.asciidoc b/examples/Docs/GetPage/fbcf5078a6a9e09790553804054c36b3.asciidoc deleted file mode 100644 index e59e33bc1e4..00000000000 --- a/examples/Docs/GetPage/fbcf5078a6a9e09790553804054c36b3.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/get.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/GetPage.cs#L14-L23. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(0, g => g.Index("twitter")); ----- diff --git a/examples/Docs/IndexPage/048d8abd42d094bbdcf4452a58ccb35b.asciidoc b/examples/Docs/IndexPage/048d8abd42d094bbdcf4452a58ccb35b.asciidoc deleted file mode 100644 index e2bd692b4cf..00000000000 --- a/examples/Docs/IndexPage/048d8abd42d094bbdcf4452a58ccb35b.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/index_.asciidoc:531 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line531 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L181-L204. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createResponse = client.Create(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, -i => i - .Index("twitter") - .Id(1) -); ----- diff --git a/examples/Docs/IndexPage/1f336ecc62480c1d56351cc2f82d0d08.asciidoc b/examples/Docs/IndexPage/1f336ecc62480c1d56351cc2f82d0d08.asciidoc deleted file mode 100644 index 35a51ed2522..00000000000 --- a/examples/Docs/IndexPage/1f336ecc62480c1d56351cc2f82d0d08.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/index_.asciidoc:440 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line440 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L137-L158. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - Message = "elasticsearch now has versioning support, double cool!" -}, - i => i - .Index("twitter") - .Id(1) - .Version(2) - .VersionType(VersionType.External) -); ----- diff --git a/examples/Docs/IndexPage/36818c6d9f434d387819c30bd9addb14.asciidoc b/examples/Docs/IndexPage/36818c6d9f434d387819c30bd9addb14.asciidoc deleted file mode 100644 index 6bb2080c8d8..00000000000 --- a/examples/Docs/IndexPage/36818c6d9f434d387819c30bd9addb14.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// docs/index_.asciidoc:237 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line237 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L62-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, - i => i - .Index("twitter") -); ----- diff --git a/examples/Docs/IndexPage/625dc94df1f9affb49a082fd99d41620.asciidoc b/examples/Docs/IndexPage/625dc94df1f9affb49a082fd99d41620.asciidoc deleted file mode 100644 index f05d2b634a1..00000000000 --- a/examples/Docs/IndexPage/625dc94df1f9affb49a082fd99d41620.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/index_.asciidoc:286 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line286 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L86-L109. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, - i => i - .Index("twitter") - .Routing("kimchy") -); ----- diff --git a/examples/Docs/IndexPage/804a97ff4d0613e6568e4efb19c52021.asciidoc b/examples/Docs/IndexPage/804a97ff4d0613e6568e4efb19c52021.asciidoc deleted file mode 100644 index 6769a9b44df..00000000000 --- a/examples/Docs/IndexPage/804a97ff4d0613e6568e4efb19c52021.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// docs/index_.asciidoc:188 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line188 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L16-L60. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putSettingsResponse = client.Cluster.PutSettings(s => s - .Persistent(p => p - .Add("action.auto_create_index", "twitter,index10,-index1*,+ind*") - ) -); - -var putSettingsResponse2 = client.Cluster.PutSettings(s => s - .Persistent(p => p - .Add("action.auto_create_index", "false") - ) -); - -var putSettingsResponse3 = client.Cluster.PutSettings(s => s - .Persistent(p => p - .Add("action.auto_create_index", "true") - ) -); ----- diff --git a/examples/Docs/IndexPage/b918d6b798da673a33e49b94f61dcdc0.asciidoc b/examples/Docs/IndexPage/b918d6b798da673a33e49b94f61dcdc0.asciidoc deleted file mode 100644 index 6aac5ed20ad..00000000000 --- a/examples/Docs/IndexPage/b918d6b798da673a33e49b94f61dcdc0.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// docs/index_.asciidoc:411 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line411 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L111-L135. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, - i => i - .Index("twitter") - .Id(1) - .Timeout("5m") -); ----- diff --git a/examples/Docs/IndexPage/bb143628fd04070683eeeadc9406d9cc.asciidoc b/examples/Docs/IndexPage/bb143628fd04070683eeeadc9406d9cc.asciidoc deleted file mode 100644 index eed90b4f324..00000000000 --- a/examples/Docs/IndexPage/bb143628fd04070683eeeadc9406d9cc.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// docs/index_.asciidoc:498 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line498 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L159-L179. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, -i => i.Index("twitter").Id(1)); ----- diff --git a/examples/Docs/IndexPage/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc b/examples/Docs/IndexPage/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc deleted file mode 100644 index 3bf95d4fc9c..00000000000 --- a/examples/Docs/IndexPage/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// docs/index_.asciidoc:544 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line544 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/IndexPage.cs#L206-L230. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, - i => i - .Index("twitter") - .Id(1) - .OpType(OpType.Create) - ); ----- diff --git a/examples/Docs/ReindexPage/0cc991e3f7f8511a34730e154b3c5edc.asciidoc b/examples/Docs/ReindexPage/0cc991e3f7f8511a34730e154b3c5edc.asciidoc deleted file mode 100644 index 4c1e0c0266d..00000000000 --- a/examples/Docs/ReindexPage/0cc991e3f7f8511a34730e154b3c5edc.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:25 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line25 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L17-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter")) - .Destination(d => d.Index("new_twitter")) -); ----- diff --git a/examples/Docs/ReindexPage/1216f8f7367df3aa823012cef310c08a.asciidoc b/examples/Docs/ReindexPage/1216f8f7367df3aa823012cef310c08a.asciidoc deleted file mode 100644 index 3b730a530dd..00000000000 --- a/examples/Docs/ReindexPage/1216f8f7367df3aa823012cef310c08a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:716 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line716 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L357-L381. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("test")) - .Destination(d => d.Index("test2")) - .Script(@"ctx._source.tag = ctx._source.remove(""flag"")") -); ----- diff --git a/examples/Docs/ReindexPage/1577e6e806b3283c9e99f1596d310754.asciidoc b/examples/Docs/ReindexPage/1577e6e806b3283c9e99f1596d310754.asciidoc deleted file mode 100644 index f42e6dc4d3a..00000000000 --- a/examples/Docs/ReindexPage/1577e6e806b3283c9e99f1596d310754.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// docs/reindex.asciidoc:704 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line704 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L338-L355. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new { text = "words words", flag = "foo" }, - i => i.Index("test").Id(1).Refresh(Refresh.True)); ----- diff --git a/examples/Docs/ReindexPage/1b8655e6ba99fe39933c6eafe78728b7.asciidoc b/examples/Docs/ReindexPage/1b8655e6ba99fe39933c6eafe78728b7.asciidoc deleted file mode 100644 index b68fa6d9c94..00000000000 --- a/examples/Docs/ReindexPage/1b8655e6ba99fe39933c6eafe78728b7.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// docs/reindex.asciidoc:204 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line204 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L52-L95. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse1 = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter").Slice(r => r.Id(0).Max(2))) - .Destination(d => d.Index("new_twitter")) -); - -var reindexResponse2 = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter").Slice(r => r.Id(1).Max(2))) - .Destination(d => d.Index("new_twitter")) -); ----- diff --git a/examples/Docs/ReindexPage/1bc731a4df952228af6dfa6b48627332.asciidoc b/examples/Docs/ReindexPage/1bc731a4df952228af6dfa6b48627332.asciidoc deleted file mode 100644 index 4604afd907a..00000000000 --- a/examples/Docs/ReindexPage/1bc731a4df952228af6dfa6b48627332.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:819 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line819 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L458-L494. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.MaximumDocuments(10) - .Source(s => s.Index("twitter").Query(q => q.FunctionScore(f => f.Functions(ff => ff.RandomScore()).MinScore(0.9)))) - .Destination(d => d.Index("random_twitter")) -); ----- diff --git a/examples/Docs/ReindexPage/36b2778f23d0955255f52c075c4d213d.asciidoc b/examples/Docs/ReindexPage/36b2778f23d0955255f52c075c4d213d.asciidoc deleted file mode 100644 index 12e739af981..00000000000 --- a/examples/Docs/ReindexPage/36b2778f23d0955255f52c075c4d213d.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/reindex.asciidoc:905 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line905 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L527-L566. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s - .Index("source") - .Remote(r => r - .Host(new Uri("http://otherhost:9200")) - .Username("user") - .Password("pass")) - .Query(q => q.Match(m => m.Field("test").Query("data")))) - .Destination(d => d.Index("dest")) -); ----- diff --git a/examples/Docs/ReindexPage/3ae03ba3b56e5e287953094050766738.asciidoc b/examples/Docs/ReindexPage/3ae03ba3b56e5e287953094050766738.asciidoc deleted file mode 100644 index 3f25d645103..00000000000 --- a/examples/Docs/ReindexPage/3ae03ba3b56e5e287953094050766738.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/reindex.asciidoc:237 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line237 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L97-L116. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var refreshResponse = client.Indices.Refresh(); - -var searchResponse = client.Search(s => s.Index("new_twitter").Size(0).FilterPath(new[] { "hits.total" })); ----- diff --git a/examples/Docs/ReindexPage/3b04cc894e6a47d57983484010feac0c.asciidoc b/examples/Docs/ReindexPage/3b04cc894e6a47d57983484010feac0c.asciidoc deleted file mode 100644 index 52423f7dd32..00000000000 --- a/examples/Docs/ReindexPage/3b04cc894e6a47d57983484010feac0c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/reindex.asciidoc:804 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line804 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L443-L456. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse1 = client.Get(1, i => i.Index("metricbeat-2016.05.30-1")); - -var getResponse2 = client.Get(1, i => i.Index("metricbeat-2016.05.31-1")); ----- diff --git a/examples/Docs/ReindexPage/400e89eb46ead8e9c9e40f123fd5e590.asciidoc b/examples/Docs/ReindexPage/400e89eb46ead8e9c9e40f123fd5e590.asciidoc deleted file mode 100644 index 42dd89bd42a..00000000000 --- a/examples/Docs/ReindexPage/400e89eb46ead8e9c9e40f123fd5e590.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:398 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line398 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L189-L211. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("source").Size(100)) - .Destination(d => d.Index("dest").Routing("=cat")) -); ----- diff --git a/examples/Docs/ReindexPage/52b2bfbdd78f8283b6f4891c48013237.asciidoc b/examples/Docs/ReindexPage/52b2bfbdd78f8283b6f4891c48013237.asciidoc deleted file mode 100644 index 8469271000f..00000000000 --- a/examples/Docs/ReindexPage/52b2bfbdd78f8283b6f4891c48013237.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:635 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line635 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L266-L288. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter")) - .Destination(d => d.Index("new_twitter")) - .MaximumDocuments(1) -); ----- diff --git a/examples/Docs/ReindexPage/64b9baa6d7556b960b29698f3383aa31.asciidoc b/examples/Docs/ReindexPage/64b9baa6d7556b960b29698f3383aa31.asciidoc deleted file mode 100644 index da18b66516d..00000000000 --- a/examples/Docs/ReindexPage/64b9baa6d7556b960b29698f3383aa31.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// docs/reindex.asciidoc:971 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line971 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L568-L604. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s - .Remote(r => r.Host(new Uri("http://otherhost:9200"))) - .Index("source") - .Size(10) - .Query(q => q.Match(m => m.Field("test").Query("data")))) - .Destination(d => d.Index("dest")) -); ----- diff --git a/examples/Docs/ReindexPage/68738b4fd0dda177022be45be95b4c84.asciidoc b/examples/Docs/ReindexPage/68738b4fd0dda177022be45be95b4c84.asciidoc deleted file mode 100644 index 302a8d0a665..00000000000 --- a/examples/Docs/ReindexPage/68738b4fd0dda177022be45be95b4c84.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/reindex.asciidoc:174 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line174 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L39-L50. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexRethrottle("r1A2WoRbTwKZ516z6NEs5A:36619", d => - d.RequestsPerSecond(-1) -); ----- diff --git a/examples/Docs/ReindexPage/6f097c298a7abf4c032c4314920c49c8.asciidoc b/examples/Docs/ReindexPage/6f097c298a7abf4c032c4314920c49c8.asciidoc deleted file mode 100644 index 8bca9cb98b4..00000000000 --- a/examples/Docs/ReindexPage/6f097c298a7abf4c032c4314920c49c8.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:657 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line657 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L290-L313. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index(new[] { "twitter", "blog" })) - .Destination(d => d.Index("all_together")) -); ----- diff --git a/examples/Docs/ReindexPage/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc b/examples/Docs/ReindexPage/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc deleted file mode 100644 index bc91e867ea0..00000000000 --- a/examples/Docs/ReindexPage/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:609 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line609 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L236-L264. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter").Query(q => q.Term(f => f.User, "kimchy"))) - .Destination(d => d.Index("new_twitter")) -); ----- diff --git a/examples/Docs/ReindexPage/78c96113ae4ed0054e581b17542528a7.asciidoc b/examples/Docs/ReindexPage/78c96113ae4ed0054e581b17542528a7.asciidoc deleted file mode 100644 index 675a3aeba22..00000000000 --- a/examples/Docs/ReindexPage/78c96113ae4ed0054e581b17542528a7.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/reindex.asciidoc:373 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line373 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L156-L187. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("source").Query(q => q.Match(m => m.Field("company").Query("cat")))) - .Destination(d => d.Index("dest").Routing("=cat")) - .Slices(5) - .Refresh() -); ----- diff --git a/examples/Docs/ReindexPage/7f697eb436dfa3c30dfe610d8c32d132.asciidoc b/examples/Docs/ReindexPage/7f697eb436dfa3c30dfe610d8c32d132.asciidoc deleted file mode 100644 index c3014faeedf..00000000000 --- a/examples/Docs/ReindexPage/7f697eb436dfa3c30dfe610d8c32d132.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/reindex.asciidoc:1002 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line1002 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L606-L645. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s - .Index("source") - .Remote(r => r - .Host(new Uri("http://otherhost:9200")) - .SocketTimeout("1m") - .ConnectTimeout("10s")) - .Query(q => q.Match(m => m.Field("test").Query("data")))) - .Destination(d => d.Index("dest")) -); ----- diff --git a/examples/Docs/ReindexPage/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc b/examples/Docs/ReindexPage/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc deleted file mode 100644 index dadf7ec8c04..00000000000 --- a/examples/Docs/ReindexPage/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:850 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line850 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L496-L525. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter")) - .Destination(d => d.Index("new_twitter").VersionType(VersionType.External)) - .Script(@"if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}") -); ----- diff --git a/examples/Docs/ReindexPage/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc b/examples/Docs/ReindexPage/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc deleted file mode 100644 index cb1a55870e3..00000000000 --- a/examples/Docs/ReindexPage/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:784 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line784 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L413-L441. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("metricbeat-*")) - .Destination(d => d.Index("metricbeat")) - .Script(@"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'") -); ----- diff --git a/examples/Docs/ReindexPage/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc b/examples/Docs/ReindexPage/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc deleted file mode 100644 index db6205ba462..00000000000 --- a/examples/Docs/ReindexPage/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/reindex.asciidoc:768 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line768 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L394-L411. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new Dictionary { { "system.cpu.idle.pct", 0.908 } }, - i => i.Index("metricbeat-2016.05.30").Id(1).Refresh(Refresh.True)); - -var indexResponse2 = client.Index(new Dictionary { { "system.cpu.idle.pct", 0.105 } }, - i => i.Index("metricbeat-2016.05.31").Id(1).Refresh(Refresh.True)); ----- diff --git a/examples/Docs/ReindexPage/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc b/examples/Docs/ReindexPage/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc deleted file mode 100644 index d3e5eaeb446..00000000000 --- a/examples/Docs/ReindexPage/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:417 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line417 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L213-L234. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("source")) - .Destination(d => d.Index("dest").Pipeline("some_ingest_pipeline")) -); ----- diff --git a/examples/Docs/ReindexPage/cb01106bf524df5e0501d4c655c1aa7b.asciidoc b/examples/Docs/ReindexPage/cb01106bf524df5e0501d4c655c1aa7b.asciidoc deleted file mode 100644 index dc4ca737661..00000000000 --- a/examples/Docs/ReindexPage/cb01106bf524df5e0501d4c655c1aa7b.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/reindex.asciidoc:264 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line264 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L118-L140. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter")) - .Destination(d => d.Index("new_twitter")) - .Slices(5) - .Refresh() -); ----- diff --git a/examples/Docs/ReindexPage/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc b/examples/Docs/ReindexPage/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc deleted file mode 100644 index 15a11c5d4af..00000000000 --- a/examples/Docs/ReindexPage/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/reindex.asciidoc:735 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line735 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L383-L392. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(1, d => d.Index("test2")); ----- diff --git a/examples/Docs/ReindexPage/e567e6dbf86300142573c73789c8fce4.asciidoc b/examples/Docs/ReindexPage/e567e6dbf86300142573c73789c8fce4.asciidoc deleted file mode 100644 index 48a0e1c98a2..00000000000 --- a/examples/Docs/ReindexPage/e567e6dbf86300142573c73789c8fce4.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/reindex.asciidoc:280 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line280 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L142-L154. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s.Index("new_twitter").Size(0).FilterPath(new[] { "hits.total" })); ----- diff --git a/examples/Docs/ReindexPage/e9c2e15b36372d5281c879d336322b6c.asciidoc b/examples/Docs/ReindexPage/e9c2e15b36372d5281c879d336322b6c.asciidoc deleted file mode 100644 index 14b97d5865b..00000000000 --- a/examples/Docs/ReindexPage/e9c2e15b36372d5281c879d336322b6c.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/reindex.asciidoc:683 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line683 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/ReindexPage.cs#L315-L336. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexResponse = client.ReindexOnServer(d => - d.Source(s => s.Index("twitter").Source(s => s.Fields("user", "_doc"))) - .Destination(d => d.Index("new_twitter")) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/025b54db0edc50c24ea48a2bd94366ad.asciidoc b/examples/Docs/UpdateByQueryPage/025b54db0edc50c24ea48a2bd94366ad.asciidoc deleted file mode 100644 index 5e30c15224e..00000000000 --- a/examples/Docs/UpdateByQueryPage/025b54db0edc50c24ea48a2bd94366ad.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/update-by-query.asciidoc:606 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line606 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L326-L343. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Size(0) - .QueryOnQueryString("extra:test") - .FilterPath(new[] { "hits.total" }) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/0d664883151008b1051ef2c9ab2d0373.asciidoc b/examples/Docs/UpdateByQueryPage/0d664883151008b1051ef2c9ab2d0373.asciidoc deleted file mode 100644 index c6f58a7cee3..00000000000 --- a/examples/Docs/UpdateByQueryPage/0d664883151008b1051ef2c9ab2d0373.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -// docs/update-by-query.asciidoc:537 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line537 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L226-L275. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Slice(s => s - .Id(0) - .Max(2) - ) - .Script(s => s - .Source("ctx._source['extra'] = 'test'") - ) -); - -var updateByQueryResponse2 = client.UpdateByQuery(u => u - .Index("twitter") - .Slice(s => s - .Id(1) - .Max(2) - ) - .Script(s => s - .Source("ctx._source['extra'] = 'test'") - ) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc b/examples/Docs/UpdateByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc deleted file mode 100644 index a103a48f937..00000000000 --- a/examples/Docs/UpdateByQueryPage/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/update-by-query.asciidoc:498 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line498 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L199-L210. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var cancelTasksResponse = client.Tasks.Cancel(c => c - .TaskId("r1A2WoRbTwKZ516z6NEs5A:36619") -); ----- diff --git a/examples/Docs/UpdateByQueryPage/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc b/examples/Docs/UpdateByQueryPage/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc deleted file mode 100644 index 463d71b0e8c..00000000000 --- a/examples/Docs/UpdateByQueryPage/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update-by-query.asciidoc:355 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line355 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L101-L137. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Script(s => s - .Source("ctx._source.likes++") - .Lang("painless") - ) - .Query(q => q - .Term(f => f.User, "kimchy") - ) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc b/examples/Docs/UpdateByQueryPage/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc deleted file mode 100644 index b8ab7f6109c..00000000000 --- a/examples/Docs/UpdateByQueryPage/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -// docs/update-by-query.asciidoc:662 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line662 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L345-L413. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test", c => c - .Map(m => m - .Dynamic(false) - .Properties(p => p.Text(t => t.Name("text"))) - ) -); - -var indexResponse1 = client.Index(new -{ - Text = "words words", - Flag = "bar" -}, - i => i - .Index("test") -); - -var indexResponse2 = client.Index(new -{ - Text = "words words", - Flag = "foo" -}, - i => i - .Index("test") -); - -var putMappingResponse = client.Map(c => - c.Index("test") - .Properties(p => - p.Text(t => t.Name("text")) - .Text(t => t.Name("flag").Analyzer("keyword")) - ) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/4acf902c2598b2558f34f20c1744c433.asciidoc b/examples/Docs/UpdateByQueryPage/4acf902c2598b2558f34f20c1744c433.asciidoc deleted file mode 100644 index b16544ce5e7..00000000000 --- a/examples/Docs/UpdateByQueryPage/4acf902c2598b2558f34f20c1744c433.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// docs/update-by-query.asciidoc:564 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line564 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L277-L301. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var refreshResponse = client.Indices.Refresh(); - -var searchResponse = client.Search(s => s - .Index("twitter") - .Size(0) - .QueryOnQueryString("extra:test") - .FilterPath(new[] { "hits.total" }) //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Docs/UpdateByQueryPage/52a87b81e4e0b6b11e23e85db1602a63.asciidoc b/examples/Docs/UpdateByQueryPage/52a87b81e4e0b6b11e23e85db1602a63.asciidoc deleted file mode 100644 index 15270218240..00000000000 --- a/examples/Docs/UpdateByQueryPage/52a87b81e4e0b6b11e23e85db1602a63.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// docs/update-by-query.asciidoc:307 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line307 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L29-L58. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Conflicts(Conflicts.Proceed) - .Query(q => q - .Term(f => f.User, "kimchy") - ) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/54a770f053f3225ea0d1e34334232411.asciidoc b/examples/Docs/UpdateByQueryPage/54a770f053f3225ea0d1e34334232411.asciidoc deleted file mode 100644 index 29af03f2e96..00000000000 --- a/examples/Docs/UpdateByQueryPage/54a770f053f3225ea0d1e34334232411.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/update-by-query.asciidoc:343 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line343 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L87-L99. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .ScrollSize(100) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/7df191cc7f814e410a4ac7261065e6ef.asciidoc b/examples/Docs/UpdateByQueryPage/7df191cc7f814e410a4ac7261065e6ef.asciidoc deleted file mode 100644 index 510d80d5042..00000000000 --- a/examples/Docs/UpdateByQueryPage/7df191cc7f814e410a4ac7261065e6ef.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/update-by-query.asciidoc:420 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line420 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L174-L186. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var listTasksResponse = client.Tasks.List(t => t - .Detailed() - .Actions("*byquery") -); ----- diff --git a/examples/Docs/UpdateByQueryPage/97babc8d19ef0866774576716eb6d19e.asciidoc b/examples/Docs/UpdateByQueryPage/97babc8d19ef0866774576716eb6d19e.asciidoc deleted file mode 100644 index c6430558058..00000000000 --- a/examples/Docs/UpdateByQueryPage/97babc8d19ef0866774576716eb6d19e.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// docs/update-by-query.asciidoc:727 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line727 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L448-L487. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("test") - .Conflicts(Conflicts.Proceed) - .Refresh() -); - -var searchResponse = client.Search(s => s - .Index("test") - .Query(q => q - .Match(m => m - .Field("flag") - .Query("foo") - ) - ) - .FilterPath(new[] { "hits.total" }) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/a4a396cd07657b3977713fb3a742c41b.asciidoc b/examples/Docs/UpdateByQueryPage/a4a396cd07657b3977713fb3a742c41b.asciidoc deleted file mode 100644 index 915f1552b43..00000000000 --- a/examples/Docs/UpdateByQueryPage/a4a396cd07657b3977713fb3a742c41b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/update-by-query.asciidoc:12 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line12 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L15-L27. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Conflicts(Conflicts.Proceed) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc b/examples/Docs/UpdateByQueryPage/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc deleted file mode 100644 index 243be7a5823..00000000000 --- a/examples/Docs/UpdateByQueryPage/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update-by-query.asciidoc:700 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line700 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L415-L446. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("test") - .Query(q => q - .Match(m => m - .Field("flag") - .Query("foo") - ) - ) - .FilterPath(new[] { "hits.total" }) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc b/examples/Docs/UpdateByQueryPage/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc deleted file mode 100644 index fe13f87f5df..00000000000 --- a/examples/Docs/UpdateByQueryPage/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/update-by-query.asciidoc:517 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line517 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L212-L224. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryRethrottleResponse = client.UpdateByQueryRethrottle( - "r1A2WoRbTwKZ516z6NEs5A:36619", r => r - .RequestsPerSecond(-1) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc b/examples/Docs/UpdateByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc deleted file mode 100644 index 777d9d86d7d..00000000000 --- a/examples/Docs/UpdateByQueryPage/be3a6431d01846950dc1a39a7a6a1faa.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// docs/update-by-query.asciidoc:478 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line478 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L188-L197. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getTaskResponse = client.Tasks.GetTask("r1A2WoRbTwKZ516z6NEs5A:36619"); ----- diff --git a/examples/Docs/UpdateByQueryPage/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc b/examples/Docs/UpdateByQueryPage/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc deleted file mode 100644 index 43accaa5708..00000000000 --- a/examples/Docs/UpdateByQueryPage/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// docs/update-by-query.asciidoc:396 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line396 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L139-L172. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putPipelineResponse = client.Ingest.PutPipeline("set-foo", p => p - .Description("sets foo") - .Processors(pr => pr - .Set(s => s - .Field("foo") - .Value("bar") - ) - ) -); - -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Pipeline("set-foo") -); ----- diff --git a/examples/Docs/UpdateByQueryPage/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc b/examples/Docs/UpdateByQueryPage/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc deleted file mode 100644 index a9ebecb7003..00000000000 --- a/examples/Docs/UpdateByQueryPage/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/update-by-query.asciidoc:326 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line326 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L60-L71. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index(new[] { "twitter", "blog" }) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/d8b115341da772a628a024e7d1644e73.asciidoc b/examples/Docs/UpdateByQueryPage/d8b115341da772a628a024e7d1644e73.asciidoc deleted file mode 100644 index c8e4c6b8d05..00000000000 --- a/examples/Docs/UpdateByQueryPage/d8b115341da772a628a024e7d1644e73.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// docs/update-by-query.asciidoc:334 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line334 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L73-L85. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Routing(1) -); ----- diff --git a/examples/Docs/UpdateByQueryPage/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc b/examples/Docs/UpdateByQueryPage/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc deleted file mode 100644 index 8f47f75dac2..00000000000 --- a/examples/Docs/UpdateByQueryPage/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// docs/update-by-query.asciidoc:593 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line593 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdateByQueryPage.cs#L303-L324. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateByQueryResponse = client.UpdateByQuery(u => u - .Index("twitter") - .Slices(5) - .Script(s => s - .Source("ctx._source['extra'] = 'test'") - ) - .Refresh() -); ----- diff --git a/examples/Docs/UpdatePage/015294a400986295039e52ebc62033be.asciidoc b/examples/Docs/UpdatePage/015294a400986295039e52ebc62033be.asciidoc deleted file mode 100644 index 92c3d98fd23..00000000000 --- a/examples/Docs/UpdatePage/015294a400986295039e52ebc62033be.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// docs/update.asciidoc:251 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line251 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L227-L249. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Doc(new - { - name = "new_name" - }) - .DetectNoop(false) -); ----- diff --git a/examples/Docs/UpdatePage/0a958e486ede3f519d48431ab689eded.asciidoc b/examples/Docs/UpdatePage/0a958e486ede3f519d48431ab689eded.asciidoc deleted file mode 100644 index cf845309557..00000000000 --- a/examples/Docs/UpdatePage/0a958e486ede3f519d48431ab689eded.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// docs/update.asciidoc:271 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line271 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L251-L285. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("ctx._source.counter += params.count") - .Lang("painless") - .Params(p => p - .Add("count", 4) - ) - ) - .Upsert(new - { - counter = 1 - }) -); ----- diff --git a/examples/Docs/UpdatePage/381fced1882ca8337143e6bb180a5715.asciidoc b/examples/Docs/UpdatePage/381fced1882ca8337143e6bb180a5715.asciidoc deleted file mode 100644 index cf9d6f7d3b8..00000000000 --- a/examples/Docs/UpdatePage/381fced1882ca8337143e6bb180a5715.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// docs/update.asciidoc:84 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line84 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L13-L33. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new -{ - counter = 1, - tags = new[] { "red" } -}, i => i - .Index("test") - .Id(1) -); ----- diff --git a/examples/Docs/UpdatePage/38c1d0f6668e9563c0827f839f9fa505.asciidoc b/examples/Docs/UpdatePage/38c1d0f6668e9563c0827f839f9fa505.asciidoc deleted file mode 100644 index b71ede85d23..00000000000 --- a/examples/Docs/UpdatePage/38c1d0f6668e9563c0827f839f9fa505.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// docs/update.asciidoc:198 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line198 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L205-L225. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Doc(new - { - name = "new_name" - }) -); ----- diff --git a/examples/Docs/UpdatePage/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc b/examples/Docs/UpdatePage/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc deleted file mode 100644 index c56426290ba..00000000000 --- a/examples/Docs/UpdatePage/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update.asciidoc:114 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line114 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L64-L91. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("ctx._source.tags.add(params.tag)") - .Lang("painless") - .Params(p => p - .Add("tag", "blue") - ) - ) -); ----- diff --git a/examples/Docs/UpdatePage/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc b/examples/Docs/UpdatePage/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc deleted file mode 100644 index 05e545d2c74..00000000000 --- a/examples/Docs/UpdatePage/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/update.asciidoc:164 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line164 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L149-L174. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("ctx._source.remove('new_field')") - ) -); ----- diff --git a/examples/Docs/UpdatePage/7cac05cb589f1614fd5b8589153bef06.asciidoc b/examples/Docs/UpdatePage/7cac05cb589f1614fd5b8589153bef06.asciidoc deleted file mode 100644 index 7e8bc9c90d3..00000000000 --- a/examples/Docs/UpdatePage/7cac05cb589f1614fd5b8589153bef06.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// docs/update.asciidoc:325 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line325 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L327-L349. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Doc(new - { - name = "new_name" - }) - .DocAsUpsert(true) -); ----- diff --git a/examples/Docs/UpdatePage/96de5703ba0bd43fd4ac239ec5408542.asciidoc b/examples/Docs/UpdatePage/96de5703ba0bd43fd4ac239ec5408542.asciidoc deleted file mode 100644 index b64eb63b138..00000000000 --- a/examples/Docs/UpdatePage/96de5703ba0bd43fd4ac239ec5408542.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update.asciidoc:96 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line96 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L35-L62. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("ctx._source.counter += params.count") - .Lang("painless") - .Params(p => p - .Add("count", 4) - ) - ) -); ----- diff --git a/examples/Docs/UpdatePage/98aeb275f829b5f7b8eb2147701565ff.asciidoc b/examples/Docs/UpdatePage/98aeb275f829b5f7b8eb2147701565ff.asciidoc deleted file mode 100644 index 83a1d27b313..00000000000 --- a/examples/Docs/UpdatePage/98aeb275f829b5f7b8eb2147701565ff.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update.asciidoc:177 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line177 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L176-L203. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }") - .Lang("painless") - .Params(p => p - .Add("tag", "green") - ) - ) -); ----- diff --git a/examples/Docs/UpdatePage/ac544eb247a29ca42aab13826ca88561.asciidoc b/examples/Docs/UpdatePage/ac544eb247a29ca42aab13826ca88561.asciidoc deleted file mode 100644 index c8db42c9bc3..00000000000 --- a/examples/Docs/UpdatePage/ac544eb247a29ca42aab13826ca88561.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// docs/update.asciidoc:135 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line135 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L93-L120. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }") - .Lang("painless") - .Params(p => p - .Add("tag", "blue") - ) - ) -); ----- diff --git a/examples/Docs/UpdatePage/eb30ba547e4a7b8f54f33ab259aca523.asciidoc b/examples/Docs/UpdatePage/eb30ba547e4a7b8f54f33ab259aca523.asciidoc deleted file mode 100644 index 68541eaa7a0..00000000000 --- a/examples/Docs/UpdatePage/eb30ba547e4a7b8f54f33ab259aca523.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// docs/update.asciidoc:153 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line153 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L122-L147. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update(1, u => u - .Index("test") - .Script(s => s - .Source("ctx._source.new_field = 'value_of_new_field'") - ) -); ----- diff --git a/examples/Docs/UpdatePage/f9636d7ef1a45be4f36418c875cf6bef.asciidoc b/examples/Docs/UpdatePage/f9636d7ef1a45be4f36418c875cf6bef.asciidoc deleted file mode 100644 index 16cbf1160e1..00000000000 --- a/examples/Docs/UpdatePage/f9636d7ef1a45be4f36418c875cf6bef.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// docs/update.asciidoc:296 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line296 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Docs/UpdatePage.cs#L287-L325. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var updateResponse = client.Update("dh3sgudg8gsrgl", u => u - .Index("sessions") - .ScriptedUpsert(true) - .Script(s => s - .Id("my_web_session_summariser") - .Params(p => p - .Add("pageViewEvent", new - { - url = "foo.com/bar", - response = 404, - time = "2014-01-01 12:32" - }) - ) - ) - .Upsert(new { }) -); ----- diff --git a/examples/Indices/AliasesPage/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc b/examples/Indices/AliasesPage/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc deleted file mode 100644 index 4222b8c5243..00000000000 --- a/examples/Indices/AliasesPage/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/aliases.asciidoc:304 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line304 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L202-L228. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test1", c => c - .Map(m => m - .Properties(p => p - .Keyword(k => k - .Name("user") - ) - ) - ) -); ----- diff --git a/examples/Indices/AliasesPage/3653567181f43a5f64c74f934aa821c2.asciidoc b/examples/Indices/AliasesPage/3653567181f43a5f64c74f934aa821c2.asciidoc deleted file mode 100644 index 42d1e36dfb6..00000000000 --- a/examples/Indices/AliasesPage/3653567181f43a5f64c74f934aa821c2.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/aliases.asciidoc:186 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line186 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L55-L74. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Remove(al => al - .Index("test1") - .Alias("alias1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc b/examples/Indices/AliasesPage/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc deleted file mode 100644 index fc2e8575ac1..00000000000 --- a/examples/Indices/AliasesPage/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/aliases.asciidoc:394 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line394 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L318-L331. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("alias2") - .QueryOnQueryString("user:kimchy") - .Routing("2,3") -); ----- diff --git a/examples/Indices/AliasesPage/6799d132c1c7ca3970763acde2337ef9.asciidoc b/examples/Indices/AliasesPage/6799d132c1c7ca3970763acde2337ef9.asciidoc deleted file mode 100644 index 3de3aa12e89..00000000000 --- a/examples/Indices/AliasesPage/6799d132c1c7ca3970763acde2337ef9.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/aliases.asciidoc:253 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line253 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L148-L167. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Add(al => al - .Index("test*") - .Alias("all_test_indices") - ) -); ----- diff --git a/examples/Indices/AliasesPage/67bba546d835bca8f31df13e3587c348.asciidoc b/examples/Indices/AliasesPage/67bba546d835bca8f31df13e3587c348.asciidoc deleted file mode 100644 index 26aafd44a54..00000000000 --- a/examples/Indices/AliasesPage/67bba546d835bca8f31df13e3587c348.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/aliases.asciidoc:453 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line453 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L387-L396. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(1, g => g.Index("test")); ----- diff --git a/examples/Indices/AliasesPage/7cf71671859be7c1ecf673396db377cd.asciidoc b/examples/Indices/AliasesPage/7cf71671859be7c1ecf673396db377cd.asciidoc deleted file mode 100644 index 34723f69a71..00000000000 --- a/examples/Indices/AliasesPage/7cf71671859be7c1ecf673396db377cd.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/aliases.asciidoc:320 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line320 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L230-L258. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(b => b - .Add(al => al - .Index("test1") - .Alias("alias2") - .Filter(f => f - .Term("user", "kimchy") - ) - ) -); ----- diff --git a/examples/Indices/AliasesPage/ad79228630684d950fe9792a768d24c5.asciidoc b/examples/Indices/AliasesPage/ad79228630684d950fe9792a768d24c5.asciidoc deleted file mode 100644 index 3fa70800187..00000000000 --- a/examples/Indices/AliasesPage/ad79228630684d950fe9792a768d24c5.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// indices/aliases.asciidoc:462 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line462 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L398-L435. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(b => b - .Add(al => al - .Index("test") - .Alias("alias1") - .IsWriteIndex(false) - ) - .Add(al => al - .Index("test2") - .Alias("alias1") - .IsWriteIndex() - ) -); ----- diff --git a/examples/Indices/AliasesPage/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc b/examples/Indices/AliasesPage/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc deleted file mode 100644 index ca03771083e..00000000000 --- a/examples/Indices/AliasesPage/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// indices/aliases.asciidoc:204 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line204 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L76-L100. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Remove(al => al - .Index("test1") - .Alias("alias1") - ) - .Add(al => al - .Index("test1") - .Alias("alias2") - ) -); ----- diff --git a/examples/Indices/AliasesPage/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc b/examples/Indices/AliasesPage/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc deleted file mode 100644 index 832633a51d8..00000000000 --- a/examples/Indices/AliasesPage/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/aliases.asciidoc:441 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line441 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L371-L385. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index( - new { foo = "bar" }, - i => i.Id(1).Index("alias1")); ----- diff --git a/examples/Indices/AliasesPage/b4392116f2cc57ce8064ccbad30318d5.asciidoc b/examples/Indices/AliasesPage/b4392116f2cc57ce8064ccbad30318d5.asciidoc deleted file mode 100644 index e7966ff839d..00000000000 --- a/examples/Indices/AliasesPage/b4392116f2cc57ce8064ccbad30318d5.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/aliases.asciidoc:170 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line170 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L34-L53. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Add(al => al - .Index("test1") - .Alias("alias1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc b/examples/Indices/AliasesPage/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc deleted file mode 100644 index c434cc8dfbf..00000000000 --- a/examples/Indices/AliasesPage/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// indices/aliases.asciidoc:348 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line348 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L260-L286. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(b => b - .Add(al => al - .Index("test") - .Alias("alias1") - .Routing("1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/d3016e4e8025362ad9a05ee86bb2061f.asciidoc b/examples/Indices/AliasesPage/d3016e4e8025362ad9a05ee86bb2061f.asciidoc deleted file mode 100644 index f18dd4a9fc9..00000000000 --- a/examples/Indices/AliasesPage/d3016e4e8025362ad9a05ee86bb2061f.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/aliases.asciidoc:12 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line12 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L13-L32. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Add(al => al - .Index("twitter") - .Alias("alias1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/de176bc4788ea286fff9e92418a43ea8.asciidoc b/examples/Indices/AliasesPage/de176bc4788ea286fff9e92418a43ea8.asciidoc deleted file mode 100644 index b1f4b397334..00000000000 --- a/examples/Indices/AliasesPage/de176bc4788ea286fff9e92418a43ea8.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// indices/aliases.asciidoc:276 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line276 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L169-L200. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test"); - -var createIndexResponse2 = client.Indices.Create("test_2"); - -var aliasResponse = client.Indices.BulkAlias(a => a - .Add(al => al - .Index("test_2") - .Alias("test") - ) - .RemoveIndex(al => al - .Index("test") - ) -); ----- diff --git a/examples/Indices/AliasesPage/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc b/examples/Indices/AliasesPage/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc deleted file mode 100644 index 86316ccde48..00000000000 --- a/examples/Indices/AliasesPage/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// indices/aliases.asciidoc:222 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line222 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L102-L126. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(a => a - .Add(al => al - .Index("test1") - .Alias("alias1") - ) - .Add(al => al - .Index("test2") - .Alias("alias1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/f6d6889667f56b8f49d2858070571a6b.asciidoc b/examples/Indices/AliasesPage/f6d6889667f56b8f49d2858070571a6b.asciidoc deleted file mode 100644 index e585dd18d44..00000000000 --- a/examples/Indices/AliasesPage/f6d6889667f56b8f49d2858070571a6b.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// indices/aliases.asciidoc:415 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line415 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L333-L369. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(b => b - .Add(al => al - .Index("test") - .Alias("alias1") - .IsWriteIndex() - ) - .Add(al => al - .Index("test2") - .Alias("alias1") - ) -); ----- diff --git a/examples/Indices/AliasesPage/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc b/examples/Indices/AliasesPage/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc deleted file mode 100644 index e5a97eb0a15..00000000000 --- a/examples/Indices/AliasesPage/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// indices/aliases.asciidoc:368 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line368 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/AliasesPage.cs#L288-L316. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var aliasResponse = client.Indices.BulkAlias(b => b - .Add(al => al - .Index("test") - .Alias("alias2") - .SearchRouting("1,2") - .IndexRouting("2") - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/1c23507edd7a3c18538b68223378e4ab.asciidoc b/examples/Indices/CreateIndexPage/1c23507edd7a3c18538b68223378e4ab.asciidoc deleted file mode 100644 index ece35eec170..00000000000 --- a/examples/Indices/CreateIndexPage/1c23507edd7a3c18538b68223378e4ab.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/create-index.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L13-L22. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("twitter"); ----- diff --git a/examples/Indices/CreateIndexPage/4d46dbb96125b27f46299547de9d8709.asciidoc b/examples/Indices/CreateIndexPage/4d46dbb96125b27f46299547de9d8709.asciidoc deleted file mode 100644 index e3526223860..00000000000 --- a/examples/Indices/CreateIndexPage/4d46dbb96125b27f46299547de9d8709.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/create-index.asciidoc:190 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line190 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L166-L184. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test", c => c - .Settings(s => s - .Setting("index.write.wait_for_active_shards", "2") - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/4d56b179242fed59e3d6476f817b6055.asciidoc b/examples/Indices/CreateIndexPage/4d56b179242fed59e3d6476f817b6055.asciidoc deleted file mode 100644 index 16001e9b8a8..00000000000 --- a/examples/Indices/CreateIndexPage/4d56b179242fed59e3d6476f817b6055.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// indices/create-index.asciidoc:143 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line143 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L131-L164. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test", c => c - .Aliases(a => a - .Alias("alias_1") - .Alias("alias_2", aa => aa - .Filter(f => f - .Term("user", "kimchy") - ) - .Routing("kimchy") - ) - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc b/examples/Indices/CreateIndexPage/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc deleted file mode 100644 index c9298723190..00000000000 --- a/examples/Indices/CreateIndexPage/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/create-index.asciidoc:99 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line99 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L58-L88. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("twitter", c => c - .Settings(s => s - .NumberOfShards(3) - .NumberOfReplicas(2) - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/dfef545b1e2c247bafd1347e8e807ac1.asciidoc b/examples/Indices/CreateIndexPage/dfef545b1e2c247bafd1347e8e807ac1.asciidoc deleted file mode 100644 index 3221d2dffc7..00000000000 --- a/examples/Indices/CreateIndexPage/dfef545b1e2c247bafd1347e8e807ac1.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// indices/create-index.asciidoc:123 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line123 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L90-L129. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test", c => c - .Settings(s => s - .NumberOfShards(1) - ) - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("field1") - ) - ) - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/e5d2172b524332196cac0f031c043659.asciidoc b/examples/Indices/CreateIndexPage/e5d2172b524332196cac0f031c043659.asciidoc deleted file mode 100644 index 0a141bd02de..00000000000 --- a/examples/Indices/CreateIndexPage/e5d2172b524332196cac0f031c043659.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/create-index.asciidoc:81 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line81 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L24-L56. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("twitter", c => c - .Settings(s => s - .NumberOfShards(3) - .NumberOfReplicas(2) - ) -); ----- diff --git a/examples/Indices/CreateIndexPage/fabe14480624a99e8ee42c7338672058.asciidoc b/examples/Indices/CreateIndexPage/fabe14480624a99e8ee42c7338672058.asciidoc deleted file mode 100644 index b24bfa7d01c..00000000000 --- a/examples/Indices/CreateIndexPage/fabe14480624a99e8ee42c7338672058.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/create-index.asciidoc:203 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line203 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/CreateIndexPage.cs#L186-L203. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("test", c => c - .Settings(s => s - .Setting("index.write.wait_for_active_shards", "2") - ) -); ----- diff --git a/examples/Indices/DeleteIndexPage/98f14fddddea54a7d6149ab7b92e099d.asciidoc b/examples/Indices/DeleteIndexPage/98f14fddddea54a7d6149ab7b92e099d.asciidoc deleted file mode 100644 index 2863cd9911f..00000000000 --- a/examples/Indices/DeleteIndexPage/98f14fddddea54a7d6149ab7b92e099d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/delete-index.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/DeleteIndexPage.cs#L12-L21. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var deleteIndexResponse = client.DeleteIndex("twitter"); ----- diff --git a/examples/Indices/GetIndexPage/be8f28f31207b173de61be032fcf239c.asciidoc b/examples/Indices/GetIndexPage/be8f28f31207b173de61be032fcf239c.asciidoc deleted file mode 100644 index 02e6bec21fd..00000000000 --- a/examples/Indices/GetIndexPage/be8f28f31207b173de61be032fcf239c.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/get-index.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/GetIndexPage.cs#L13-L22. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getIndexResponse = client.Indices.Get("twitter"); ----- diff --git a/examples/Indices/GetMappingPage/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc b/examples/Indices/GetMappingPage/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc deleted file mode 100644 index ccb05d5ee9c..00000000000 --- a/examples/Indices/GetMappingPage/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// indices/get-mapping.asciidoc:78 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line78 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/GetMappingPage.cs#L39-L62. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse1 = client.Indices.GetMapping(m => m - .Index("*") -); - -var getMappingResponse2 = client.Indices.GetMapping(m => m - .AllIndices() -); - -var getMappingResponse3 = client.Indices.GetMapping(m => m - .Index("") -); ----- diff --git a/examples/Indices/GetMappingPage/a8fba09a46b2c3524428aa3259b7124f.asciidoc b/examples/Indices/GetMappingPage/a8fba09a46b2c3524428aa3259b7124f.asciidoc deleted file mode 100644 index 5b83abd210e..00000000000 --- a/examples/Indices/GetMappingPage/a8fba09a46b2c3524428aa3259b7124f.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/get-mapping.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/GetMappingPage.cs#L13-L24. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse = client.Indices.GetMapping(m => m - .Index("twitter") -); ----- diff --git a/examples/Indices/GetMappingPage/cf02e3d8b371bd59f0224967c36330da.asciidoc b/examples/Indices/GetMappingPage/cf02e3d8b371bd59f0224967c36330da.asciidoc deleted file mode 100644 index 1fb7e6c3a0a..00000000000 --- a/examples/Indices/GetMappingPage/cf02e3d8b371bd59f0224967c36330da.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/get-mapping.asciidoc:68 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line68 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/GetMappingPage.cs#L26-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse = client.Indices.GetMapping(m => m - .Index("twitter,kimchy") -); ----- diff --git a/examples/Indices/PutMappingPage/0989cc65d8924f666ce3eb0820d2d244.asciidoc b/examples/Indices/PutMappingPage/0989cc65d8924f666ce3eb0820d2d244.asciidoc deleted file mode 100644 index e4b15638559..00000000000 --- a/examples/Indices/PutMappingPage/0989cc65d8924f666ce3eb0820d2d244.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/put-mapping.asciidoc:441 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line441 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L337-L356. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new { user_id = 12345 }, r => r.Index("users").Refresh(Refresh.WaitFor)); - -var indexResponse2 = client.Index(new { user_id = 12346 }, r => r.Index("users").Refresh(Refresh.WaitFor)); ----- diff --git a/examples/Indices/PutMappingPage/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc b/examples/Indices/PutMappingPage/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc deleted file mode 100644 index 16ec89b5972..00000000000 --- a/examples/Indices/PutMappingPage/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// indices/put-mapping.asciidoc:177 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line177 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L143-L179. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("my_index") - .Properties(pp => pp - .Object(o => o - .Name("name") - .Properties(p => p - .Text(t => t.Name("last")) - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/12433d2b637d002e8d5c9a1adce69d3b.asciidoc b/examples/Indices/PutMappingPage/12433d2b637d002e8d5c9a1adce69d3b.asciidoc deleted file mode 100644 index 19147ecf319..00000000000 --- a/examples/Indices/PutMappingPage/12433d2b637d002e8d5c9a1adce69d3b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/put-mapping.asciidoc:95 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line95 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L39-L48. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Indices.Create("publications"); ----- diff --git a/examples/Indices/PutMappingPage/17de0020b228df961ad3c6b06233c948.asciidoc b/examples/Indices/PutMappingPage/17de0020b228df961ad3c6b06233c948.asciidoc deleted file mode 100644 index 8dabe09cf16..00000000000 --- a/examples/Indices/PutMappingPage/17de0020b228df961ad3c6b06233c948.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/put-mapping.asciidoc:357 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line357 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L281-L306. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("my_index") - .Properties(pp => pp - .Keyword(k => k - .Name("user_id") - .IgnoreAbove(100) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/1da77e114459e0b77d78a3dcc8fae429.asciidoc b/examples/Indices/PutMappingPage/1da77e114459e0b77d78a3dcc8fae429.asciidoc deleted file mode 100644 index a3c34b6f9c0..00000000000 --- a/examples/Indices/PutMappingPage/1da77e114459e0b77d78a3dcc8fae429.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// indices/put-mapping.asciidoc:120 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line120 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L71-L100. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndex1Response = client.Indices.Create("twitter-1"); - -var createIndex2Response = client.Indices.Create("twitter-2"); - -var putMappingResponse = client.Map(m => m - .Index("twitter-1,twitter-2") - .Properties(p => - p.Text(k => k.Name(t => t.UserName)) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/1f6fe6833686e38c3711c6f2aa00a078.asciidoc b/examples/Indices/PutMappingPage/1f6fe6833686e38c3711c6f2aa00a078.asciidoc deleted file mode 100644 index 0a7637a0607..00000000000 --- a/examples/Indices/PutMappingPage/1f6fe6833686e38c3711c6f2aa00a078.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// indices/put-mapping.asciidoc:338 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line338 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L251-L279. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", m => m - .Map(m => m - .Properties(pp => pp - .Keyword(t => t - .Name("user_id") - .IgnoreAbove(20) - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/210cf5c76bff517f48e80fa1c2d63907.asciidoc b/examples/Indices/PutMappingPage/210cf5c76bff517f48e80fa1c2d63907.asciidoc deleted file mode 100644 index cbda98b1dab..00000000000 --- a/examples/Indices/PutMappingPage/210cf5c76bff517f48e80fa1c2d63907.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/put-mapping.asciidoc:197 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line197 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L181-L190. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse = client.Indices.GetMapping(r => r.Index("my_index")); ----- diff --git a/examples/Indices/PutMappingPage/53d938c754f36a912fcbe6473abb463f.asciidoc b/examples/Indices/PutMappingPage/53d938c754f36a912fcbe6473abb463f.asciidoc deleted file mode 100644 index d7c2c64f6e1..00000000000 --- a/examples/Indices/PutMappingPage/53d938c754f36a912fcbe6473abb463f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// indices/put-mapping.asciidoc:479 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line479 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L386-L406. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var reindexOnServerResponse = client.ReindexOnServer(r => r - .Source(s => s.Index("users")) - .Destination(d => d.Index("new_users")) -); ----- diff --git a/examples/Indices/PutMappingPage/5be23858b35043fcb7b50fe36b873e6e.asciidoc b/examples/Indices/PutMappingPage/5be23858b35043fcb7b50fe36b873e6e.asciidoc deleted file mode 100644 index 9129b614737..00000000000 --- a/examples/Indices/PutMappingPage/5be23858b35043fcb7b50fe36b873e6e.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/put-mapping.asciidoc:13 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line13 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L16-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("twitter") - .Properties(p => - p.Keyword(k => k.Name(t => t.Email)) - ) - ); ----- diff --git a/examples/Indices/PutMappingPage/5f3a3eefeefe6fa85ec49d499212d245.asciidoc b/examples/Indices/PutMappingPage/5f3a3eefeefe6fa85ec49d499212d245.asciidoc deleted file mode 100644 index 9fa3f571fcf..00000000000 --- a/examples/Indices/PutMappingPage/5f3a3eefeefe6fa85ec49d499212d245.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// indices/put-mapping.asciidoc:268 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line268 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L218-L249. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("my_index") - .Properties(pp => pp - .Text(t => t - .Name("city") - .Fields(f => f - .Keyword(k => k.Name("raw")) - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc b/examples/Indices/PutMappingPage/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc deleted file mode 100644 index fe983dc2055..00000000000 --- a/examples/Indices/PutMappingPage/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/put-mapping.asciidoc:533 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line533 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L408-L434. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", m => m - .Map(m => m - .Properties(pp => pp - .Keyword(t => t - .Name("user_identifier") - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc b/examples/Indices/PutMappingPage/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc deleted file mode 100644 index 314eeb2ca59..00000000000 --- a/examples/Indices/PutMappingPage/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/put-mapping.asciidoc:460 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line460 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L358-L384. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("new_users", m => m - .Map(m => m - .Properties(pp => pp - .Keyword(t => t - .Name("user_id") - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/afc29b61c532cf683f749baf013e7bfe.asciidoc b/examples/Indices/PutMappingPage/afc29b61c532cf683f749baf013e7bfe.asciidoc deleted file mode 100644 index d0b501bf1ca..00000000000 --- a/examples/Indices/PutMappingPage/afc29b61c532cf683f749baf013e7bfe.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/put-mapping.asciidoc:550 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line550 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L436-L461. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("my_index") - .Properties(p => p - .FieldAlias(k => k - .Name("user_id") - .Path("user_identifier") - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/bd5918ab903c0889bb1f09c8c2466e43.asciidoc b/examples/Indices/PutMappingPage/bd5918ab903c0889bb1f09c8c2466e43.asciidoc deleted file mode 100644 index f3ea48deb62..00000000000 --- a/examples/Indices/PutMappingPage/bd5918ab903c0889bb1f09c8c2466e43.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// indices/put-mapping.asciidoc:423 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line423 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L308-L335. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("users", m => m - .Map(m => m - .Properties(pp => pp - .Number(t => t - .Name("user_id") - .Type(NumberType.Long) - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/c849c6c8f8659dbb93e1c14356f74e37.asciidoc b/examples/Indices/PutMappingPage/c849c6c8f8659dbb93e1c14356f74e37.asciidoc deleted file mode 100644 index 24805dcddce..00000000000 --- a/examples/Indices/PutMappingPage/c849c6c8f8659dbb93e1c14356f74e37.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// indices/put-mapping.asciidoc:245 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line245 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L192-L216. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", m => m - .Map(m => m - .Properties(pp => pp - .Text(t => t.Name("city")) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/d9474f66970c6955e24b17c7447e7b5f.asciidoc b/examples/Indices/PutMappingPage/d9474f66970c6955e24b17c7447e7b5f.asciidoc deleted file mode 100644 index e9a1b7a6db4..00000000000 --- a/examples/Indices/PutMappingPage/d9474f66970c6955e24b17c7447e7b5f.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// indices/put-mapping.asciidoc:155 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line155 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L102-L141. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", m => m - .Map(m => m - .Properties(pp => pp - .Object(o => o - .Name("name") - .Properties(p => p - .Text(t => t.Name("first")) - ) - ) - ) - ) -); ----- diff --git a/examples/Indices/PutMappingPage/e4be53736bcc02b03068fd72fdbfe271.asciidoc b/examples/Indices/PutMappingPage/e4be53736bcc02b03068fd72fdbfe271.asciidoc deleted file mode 100644 index 917743d5c86..00000000000 --- a/examples/Indices/PutMappingPage/e4be53736bcc02b03068fd72fdbfe271.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/put-mapping.asciidoc:103 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line103 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/PutMappingPage.cs#L50-L69. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putMappingResponse = client.Map(m => m - .Index("publications") - .Properties(p => - p.Text(k => k.Name("title")) - ) -); ----- diff --git a/examples/Indices/TemplatesPage/1b8caf0a6741126c6d0ad83b56fce290.asciidoc b/examples/Indices/TemplatesPage/1b8caf0a6741126c6d0ad83b56fce290.asciidoc deleted file mode 100644 index 1dd527f9e14..00000000000 --- a/examples/Indices/TemplatesPage/1b8caf0a6741126c6d0ad83b56fce290.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// indices/templates.asciidoc:146 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line146 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/TemplatesPage.cs#L60-L104. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putIndexTemplateResponse = client.Indices.PutTemplate("template_1", t => t - .IndexPatterns("te*") - .Settings(s => s - .NumberOfShards(1) - ) - .Aliases(a => a - .Alias("alias1") - .Alias("alias2", aa => aa - .Filter(f => f - .Term(t => t.User, "kimchy") - ) - .Routing("kimchy") - ) - .Alias("{index}-alias") - ) -); ----- diff --git a/examples/Indices/TemplatesPage/46658f00edc4865dfe472a392374cd0f.asciidoc b/examples/Indices/TemplatesPage/46658f00edc4865dfe472a392374cd0f.asciidoc deleted file mode 100644 index 0f1af3a2ef1..00000000000 --- a/examples/Indices/TemplatesPage/46658f00edc4865dfe472a392374cd0f.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// indices/templates.asciidoc:249 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line249 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/TemplatesPage.cs#L189-L198. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getIndexTemplateResponse = client.Indices.GetTemplate("template_1", t => t.FilterPath(new[] { "*.version" })); ----- diff --git a/examples/Indices/TemplatesPage/8dcc74dc01f26e853e3b3dfa458b1ad7.asciidoc b/examples/Indices/TemplatesPage/8dcc74dc01f26e853e3b3dfa458b1ad7.asciidoc deleted file mode 100644 index c2ded0fd154..00000000000 --- a/examples/Indices/TemplatesPage/8dcc74dc01f26e853e3b3dfa458b1ad7.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// indices/templates.asciidoc:231 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line231 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/TemplatesPage.cs#L163-L187. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var templateResponse = client.Indices.PutTemplate("template_1", t => t - .IndexPatterns("myindex-*") - .Order(0) - .Settings(s => s - .NumberOfShards(1) - ) - .Version(123) -); ----- diff --git a/examples/Indices/TemplatesPage/9efac5b23bf23de8d81a7455905e2979.asciidoc b/examples/Indices/TemplatesPage/9efac5b23bf23de8d81a7455905e2979.asciidoc deleted file mode 100644 index 89fd48eeb0b..00000000000 --- a/examples/Indices/TemplatesPage/9efac5b23bf23de8d81a7455905e2979.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -// indices/templates.asciidoc:180 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line180 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/TemplatesPage.cs#L106-L161. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var templateResponse1 = client.Indices.PutTemplate("template_1", t => t - .IndexPatterns("te*") - .Order(0) - .Settings(s => s - .NumberOfShards(1) - ) - .Map(m => m - .SourceField(so => so - .Enabled(false) - ) - ) -); - -var templateResponse2 = client.Indices.PutTemplate("template_2", t => t - .IndexPatterns("tes*") - .Order(1) - .Settings(s => s - .NumberOfShards(1) - ) - .Map(m => m - .SourceField(so => so - .Enabled() - ) - ) -); ----- diff --git a/examples/Indices/TemplatesPage/e5f50b31f165462d883ecbff45f74985.asciidoc b/examples/Indices/TemplatesPage/e5f50b31f165462d883ecbff45f74985.asciidoc deleted file mode 100644 index 53918d820ae..00000000000 --- a/examples/Indices/TemplatesPage/e5f50b31f165462d883ecbff45f74985.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// indices/templates.asciidoc:20 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line20 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/TemplatesPage.cs#L14-L58. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putIndexTemplateResponse = client.Indices.PutTemplate("template_1", t => t - .IndexPatterns("te*", "bar*") - .Settings(s => s - .NumberOfShards(1) - ) - .Map(m => m - .SourceField(s => s.Enabled(false)) - .Properties(p => p - .Keyword(k => k.Name("host_name")) - .Date(d => d.Name("created_at").Format("EEE MMM dd HH:mm:ss Z yyyy")) - ) - ) -); ----- diff --git a/examples/Indices/UpdateSettingsPage/0be2c28ee65384774b1e479b47dc3d92.asciidoc b/examples/Indices/UpdateSettingsPage/0be2c28ee65384774b1e479b47dc3d92.asciidoc deleted file mode 100644 index 10b7d8667ba..00000000000 --- a/examples/Indices/UpdateSettingsPage/0be2c28ee65384774b1e479b47dc3d92.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/update-settings.asciidoc:120 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line120 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L86-L108. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.UpdateSettings("twitter", u => u - .IndexSettings(i => i - .RefreshInterval("1s") - ) -); ----- diff --git a/examples/Indices/UpdateSettingsPage/42744a175125df5be0ef77413bf8f608.asciidoc b/examples/Indices/UpdateSettingsPage/42744a175125df5be0ef77413bf8f608.asciidoc deleted file mode 100644 index ced01d20e89..00000000000 --- a/examples/Indices/UpdateSettingsPage/42744a175125df5be0ef77413bf8f608.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/update-settings.asciidoc:79 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line79 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L38-L60. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.UpdateSettings("twitter", u => u - .IndexSettings(i => i - .RefreshInterval(null) - ) -); ----- diff --git a/examples/Indices/UpdateSettingsPage/8653e76676de5d327201b77512afa3a0.asciidoc b/examples/Indices/UpdateSettingsPage/8653e76676de5d327201b77512afa3a0.asciidoc deleted file mode 100644 index a6a749924fd..00000000000 --- a/examples/Indices/UpdateSettingsPage/8653e76676de5d327201b77512afa3a0.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/update-settings.asciidoc:13 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line13 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L14-L36. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.UpdateSettings("twitter", u => u - .IndexSettings(i => i - .NumberOfReplicas(2) - ) -); ----- diff --git a/examples/Indices/UpdateSettingsPage/ba0b4081c98f3387f76b77847c52ee9a.asciidoc b/examples/Indices/UpdateSettingsPage/ba0b4081c98f3387f76b77847c52ee9a.asciidoc deleted file mode 100644 index 1c2c6e4f7cd..00000000000 --- a/examples/Indices/UpdateSettingsPage/ba0b4081c98f3387f76b77847c52ee9a.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// indices/update-settings.asciidoc:169 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line169 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L123-L160. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var closeIndexResponse = client.Indices.Close("twitter"); - -var settingsResponse = client.Indices.UpdateSettings("twitter", u => u - .IndexSettings(i => i - .Analysis(a => a - .Analyzers(an => an - .Custom("content", c => c - .Tokenizer("whitespace") - ) - ) - ) - ) -); - -var openIndexResponse = client.Indices.Open("twitter"); ----- diff --git a/examples/Indices/UpdateSettingsPage/dfac8d098b50aa0181161bcd17b38ef4.asciidoc b/examples/Indices/UpdateSettingsPage/dfac8d098b50aa0181161bcd17b38ef4.asciidoc deleted file mode 100644 index 1bfcf7f3103..00000000000 --- a/examples/Indices/UpdateSettingsPage/dfac8d098b50aa0181161bcd17b38ef4.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// indices/update-settings.asciidoc:103 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line103 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L62-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.UpdateSettings("twitter", u => u - .IndexSettings(i => i - .RefreshInterval(Time.MinusOne) - ) -); ----- diff --git a/examples/Indices/UpdateSettingsPage/fe5763d32955e8b65eb3048e97b1580c.asciidoc b/examples/Indices/UpdateSettingsPage/fe5763d32955e8b65eb3048e97b1580c.asciidoc deleted file mode 100644 index ce4464dd36e..00000000000 --- a/examples/Indices/UpdateSettingsPage/fe5763d32955e8b65eb3048e97b1580c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/update-settings.asciidoc:133 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line133 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Indices/UpdateSettingsPage.cs#L110-L121. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var mergeResponse = client.Indices.ForceMerge("twitter", f => f - .MaxNumSegments(5) -); ----- diff --git a/examples/Mapping/Dynamic/FieldMappingPage/4909bf2f9e86b4bdd6af1d0b13c0015d.asciidoc b/examples/Mapping/Dynamic/FieldMappingPage/4909bf2f9e86b4bdd6af1d0b13c0015d.asciidoc deleted file mode 100644 index 3c70339f527..00000000000 --- a/examples/Mapping/Dynamic/FieldMappingPage/4909bf2f9e86b4bdd6af1d0b13c0015d.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// mapping/dynamic/field-mapping.asciidoc:50 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line50 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/FieldMappingPage.cs#L12-L32. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index( - new { create_date = "2015/09/02" }, - i => i.Index("my_index").Id(1)); - -var getMappingResponse = client.Indices.GetMapping(m => m - .Index("my_index") -); ----- diff --git a/examples/Mapping/Dynamic/FieldMappingPage/4eae628c9aaa259f80711c6e9cc6fd25.asciidoc b/examples/Mapping/Dynamic/FieldMappingPage/4eae628c9aaa259f80711c6e9cc6fd25.asciidoc deleted file mode 100644 index e904b30f928..00000000000 --- a/examples/Mapping/Dynamic/FieldMappingPage/4eae628c9aaa259f80711c6e9cc6fd25.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/dynamic/field-mapping.asciidoc:90 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line90 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/FieldMappingPage.cs#L63-L90. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicDateFormats(new[] { "MM/dd/yyyy" }) - ) -); - -var indexResponse = client.Index( - new { create_date = "09/25/2015" }, - i => i.Index("my_index").Id(1)); ----- diff --git a/examples/Mapping/Dynamic/FieldMappingPage/95fa846e5d0a75210f9ad1fa1acfa8f3.asciidoc b/examples/Mapping/Dynamic/FieldMappingPage/95fa846e5d0a75210f9ad1fa1acfa8f3.asciidoc deleted file mode 100644 index a9d7f085014..00000000000 --- a/examples/Mapping/Dynamic/FieldMappingPage/95fa846e5d0a75210f9ad1fa1acfa8f3.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/dynamic/field-mapping.asciidoc:68 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line68 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/FieldMappingPage.cs#L34-L61. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DateDetection(false) - ) -); - -var indexResponse = client.Index( - new { create_date = "2015/09/02" }, - i => i.Index("my_index").Id(1)); ----- diff --git a/examples/Mapping/Dynamic/FieldMappingPage/fa3cd4ffaec8273656a328ae29f32c65.asciidoc b/examples/Mapping/Dynamic/FieldMappingPage/fa3cd4ffaec8273656a328ae29f32c65.asciidoc deleted file mode 100644 index e4d68616f71..00000000000 --- a/examples/Mapping/Dynamic/FieldMappingPage/fa3cd4ffaec8273656a328ae29f32c65.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/dynamic/field-mapping.asciidoc:115 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line115 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/FieldMappingPage.cs#L92-L120. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .NumericDetection(true) - ) -); - -var indexResponse = client.Index( - new { my_float = "1.0", my_integer = "1" }, - i => i.Index("my_index").Id(1)); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/0b91c082258ce623cc716b679aace653.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/0b91c082258ce623cc716b679aace653.asciidoc deleted file mode 100644 index 01a68d17c27..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/0b91c082258ce623cc716b679aace653.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -// mapping/dynamic/templates.asciidoc:193 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line193 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L143-L211. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("full_name", d => d - .PathMatch("name.*") - .PathUnmatch("*.middle") - .Mapping(mm => mm - .Text(n => n - .CopyTo(ct => ct.Field("full_name")) - ) - ) - ) - ) - ) -); - -var indexResponse = client.Index( - new - { - name = new - { - first = "John", - middle = "Winston", - last = "Lennon" - } - }, - i => i.Index("my_index").Id(1) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/1a59fa2708ccb3a24c71e8306b81f17f.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/1a59fa2708ccb3a24c71e8306b81f17f.asciidoc deleted file mode 100644 index 99885dbca4a..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/1a59fa2708ccb3a24c71e8306b81f17f.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// mapping/dynamic/templates.asciidoc:333 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line333 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L348-L382. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("strings_as_text", d => d - .MatchMappingType("string") - .Mapping(mm => mm - .Text(n => n) - ) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/3e60c0b29bd3931927e6f2ee7d2ed0ef.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/3e60c0b29bd3931927e6f2ee7d2ed0ef.asciidoc deleted file mode 100644 index 84ad77dbb28..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/3e60c0b29bd3931927e6f2ee7d2ed0ef.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// mapping/dynamic/templates.asciidoc:358 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line358 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L384-L425. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("strings_as_keywords", d => d - .MatchMappingType("string") - .Mapping(mm => mm - .Text(n => n.Norms(false).Fields(f => f.Keyword(k => k.Name("keyword").IgnoreAbove(256)))) - ) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/4f54b88e05c7a62901062e9e0ed13e5a.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/4f54b88e05c7a62901062e9e0ed13e5a.asciidoc deleted file mode 100644 index 5db34442cfb..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/4f54b88e05c7a62901062e9e0ed13e5a.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -// mapping/dynamic/templates.asciidoc:139 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line139 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L90-L141. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("longs_as_strings", d => d - .MatchMappingType("string") - .Match("long_*") - .Unmatch("*_text") - .Mapping(mm => mm - .Number(n => n - .Type(NumberType.Long) - ) - ) - ) - ) - ) -); - -var indexResponse = client.Index( - new { long_num = "5", long_text = "foo" }, - i => i.Index("my_index").Id(1) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/6873971eb4e4577d76d0a5bd7cd15ef9.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/6873971eb4e4577d76d0a5bd7cd15ef9.asciidoc deleted file mode 100644 index 4b5e1e0eb0c..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/6873971eb4e4577d76d0a5bd7cd15ef9.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -// mapping/dynamic/templates.asciidoc:253 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line253 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L246-L310. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("named_analyzers", d => d - .MatchMappingType("string") - .Match("*") - .Mapping(mm => mm - .Text(n => n.Analyzer("{name}")) - ) - ) - .DynamicTemplate("no_doc_values", d => d - .MatchMappingType("*") - .Mapping(mm => mm - .Generic(n => n.Type("{dynamic_type}").DocValues(false)) - ) - ) - ) - ) -); - -var indexResponse = client.Index(new -{ - english = "Some English text", - count = 5 -}, i => i.Index("my_index").Id(1)); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/87f85bb49d18f73d0eed0b704e05eb90.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/87f85bb49d18f73d0eed0b704e05eb90.asciidoc deleted file mode 100644 index e8a7be028c1..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/87f85bb49d18f73d0eed0b704e05eb90.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// mapping/dynamic/templates.asciidoc:305 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line305 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L312-L346. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("strings_as_keywords", d => d - .MatchMappingType("string") - .Mapping(mm => mm - .Keyword(n => n) - ) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/9a91f7d0bf52d6c582c62daef5c9d040.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/9a91f7d0bf52d6c582c62daef5c9d040.asciidoc deleted file mode 100644 index 372bc1912ad..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/9a91f7d0bf52d6c582c62daef5c9d040.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -// mapping/dynamic/templates.asciidoc:396 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line396 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L427-L477. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("unindexed_longs", d => d - .MatchMappingType("long") - .Mapping(mm => mm - .Number(n => n.Type(NumberType.Long).Index(false)) - ) - ) - .DynamicTemplate("unindexed_doubles", d => d - .MatchMappingType("double") - .Mapping(mm => mm - .Number(n => n.Type(NumberType.Float).Index(false)) - ) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/bb33e638fdeded7d721d9bbac2305fda.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/bb33e638fdeded7d721d9bbac2305fda.asciidoc deleted file mode 100644 index adcfe825335..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/bb33e638fdeded7d721d9bbac2305fda.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -// mapping/dynamic/templates.asciidoc:85 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line85 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L14-L88. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .DynamicTemplates(dt => dt - .DynamicTemplate("integers", d => d - .MatchMappingType("long") - .Mapping(mm => mm - .Number(n => n - .Type(NumberType.Integer) - ) - ) - ) - .DynamicTemplate("strings", d => d - .MatchMappingType("string") - .Mapping(mm => mm - .Text(t => t - .Fields(f => f - .Keyword(k => k - .Name("raw") - .IgnoreAbove(256) - ) - ) - ) - ) - ) - ) - ) -); - -var indexResponse = client.Index( - new { my_integer = 5, my_string = "Some string" }, - i => i.Index("my_index").Id(1) - ); ----- diff --git a/examples/Mapping/Dynamic/TemplatesPage/be51ed37c8425d281a8153abe56b04cb.asciidoc b/examples/Mapping/Dynamic/TemplatesPage/be51ed37c8425d281a8153abe56b04cb.asciidoc deleted file mode 100644 index d553981bffe..00000000000 --- a/examples/Mapping/Dynamic/TemplatesPage/be51ed37c8425d281a8153abe56b04cb.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// mapping/dynamic/templates.asciidoc:228 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line228 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Dynamic/TemplatesPage.cs#L213-L244. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new -{ - name = new - { - first = "Paul", - last = "McCartney", - title = new - { - value = "Sir", - category = "order of chivalry" - } - } -}, i => i.Index("my_index").Id(2)); ----- diff --git a/examples/Mapping/Fields/IdFieldPage/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc b/examples/Mapping/Fields/IdFieldPage/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc deleted file mode 100644 index 94943260b1d..00000000000 --- a/examples/Mapping/Fields/IdFieldPage/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// mapping/fields/id-field.asciidoc:12 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line12 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Fields/IdFieldPage.cs#L14-L58. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new -{ - text = "Document with ID 1" -}, i => i.Index("my_index").Id(1)); - -var indexResponse2 = client.Index(new -{ - text = "Document with ID 2" -}, i => i.Index("my_index").Id(2).Refresh(Refresh.True)); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Terms(t => t - .Field("_id") - .Terms("1", "2") - ) - ) -); ----- diff --git a/examples/Mapping/Params/FormatPage/7f465b7e8ed42df6c42251b4481e699e.asciidoc b/examples/Mapping/Params/FormatPage/7f465b7e8ed42df6c42251b4481e699e.asciidoc deleted file mode 100644 index c2262b9f7b3..00000000000 --- a/examples/Mapping/Params/FormatPage/7f465b7e8ed42df6c42251b4481e699e.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// mapping/params/format.asciidoc:13 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line13 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Params/FormatPage.cs#L12-L40. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Date(d => d - .Name("date") - .Format("yyyy-MM-dd") - ) - ) - ) -); ----- diff --git a/examples/Mapping/Params/MultiFieldsPage/5271f4ff29bb48838396e5a674664ee0.asciidoc b/examples/Mapping/Params/MultiFieldsPage/5271f4ff29bb48838396e5a674664ee0.asciidoc deleted file mode 100644 index 9fd39c76790..00000000000 --- a/examples/Mapping/Params/MultiFieldsPage/5271f4ff29bb48838396e5a674664ee0.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -// mapping/params/multi-fields.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Params/MultiFieldsPage.cs#L14-L118. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("city") - .Fields(f => f - .Keyword(k => k - .Name("raw") - ) - ) - ) - ) - ) -); - -var indexResponse1 = client.Index(new -{ - city = "New York" -}, i => i.Index("my_index").Id(1)); - -var indexResponse2 = client.Index(new -{ - city = "York" -}, i => i.Index("my_index").Id(2)); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Match(m => m - .Field("city") - .Query("york") - ) - ) - .Sort(so => so - .Field("city.raw", SortOrder.Ascending) - ) - .Aggregations(a => a - .Terms("Cities", t => t - .Field("city.raw") - ) - ) -); ----- diff --git a/examples/Mapping/Params/MultiFieldsPage/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc b/examples/Mapping/Params/MultiFieldsPage/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc deleted file mode 100644 index b9557be8c4e..00000000000 --- a/examples/Mapping/Params/MultiFieldsPage/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -// mapping/params/multi-fields.asciidoc:75 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line75 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Params/MultiFieldsPage.cs#L120-L199. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("text") - .Fields(f => f - .Text(k => k - .Name("english") - .Analyzer("english") - ) - ) - ) - ) - ) -); - -var indexResponse1 = client.Index(new -{ - text = "quick brown fox" -}, i => i.Index("my_index").Id(1)); - -var indexResponse2 = client.Index(new -{ - text = "quick brown foxes" -}, i => i.Index("my_index").Id(2)); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .MultiMatch(m => m - .Fields(new[] { "text", "text.english" }) - .Query("quick brown foxes") - .Type(TextQueryType.MostFields) - ) - ) -); ----- diff --git a/examples/Mapping/Types/ArrayPage/4d6997c70a1851f9151443c0d38b532e.asciidoc b/examples/Mapping/Types/ArrayPage/4d6997c70a1851f9151443c0d38b532e.asciidoc deleted file mode 100644 index ff347d1af42..00000000000 --- a/examples/Mapping/Types/ArrayPage/4d6997c70a1851f9151443c0d38b532e.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -// mapping/types/array.asciidoc:42 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line42 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/ArrayPage.cs#L13-L85. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = - client.Index( - new - { - message = "some arrays in this document...", - tags = new[] { "elasticsearch", "wow" }, - lists = new[] - { - new { name = "prog_list", description = "programming list" }, - new { name = "cool_list", description = "cool stuff list" }, - } - }, i => i.Id(1).Index("my_index")); - -var indexResponse2 = - client.Index( - new - { - message = "no arrays in this document...", - tags = "elasticsearch", - lists = new { name = "prog_list", description = "programming list" } - }, i => i.Id(2).Index("my_index")); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Match(m => m - .Field("tags") - .Query("elasticsearch") - ) - ) -); ----- diff --git a/examples/Mapping/Types/DatePage/645136747d37368a14ab34de8bd046c6.asciidoc b/examples/Mapping/Types/DatePage/645136747d37368a14ab34de8bd046c6.asciidoc deleted file mode 100644 index ad12d4116cb..00000000000 --- a/examples/Mapping/Types/DatePage/645136747d37368a14ab34de8bd046c6.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -// mapping/types/date.asciidoc:35 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line35 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/DatePage.cs#L14-L79. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Date(d => d - .Name("date") - ) - ) - ) -); - -var indexResponse = client.Index( - new { date = "2015-01-01" }, - i => i.Id(1).Index("my_index")); - -var indexResponse2 = client.Index( - new { date = "2015-01-01T12:10:30Z" }, - i => i.Id(2).Index("my_index")); - -var indexResponse3 = client.Index( - new { date = 1420070400001 }, - i => i.Id(3).Index("my_index")); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Sort(so => so - .Ascending("date") - ) -); ----- diff --git a/examples/Mapping/Types/DatePage/e2a042c629429855c3bcaefffb26b7fa.asciidoc b/examples/Mapping/Types/DatePage/e2a042c629429855c3bcaefffb26b7fa.asciidoc deleted file mode 100644 index 851a3a1e54c..00000000000 --- a/examples/Mapping/Types/DatePage/e2a042c629429855c3bcaefffb26b7fa.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// mapping/types/date.asciidoc:77 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line77 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/DatePage.cs#L81-L109. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Date(d => d - .Name("date") - .Format("yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis") - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/KeywordPage/46c4b0dfb674825f9579203d41e7f404.asciidoc b/examples/Mapping/Types/KeywordPage/46c4b0dfb674825f9579203d41e7f404.asciidoc deleted file mode 100644 index 9512e426e3b..00000000000 --- a/examples/Mapping/Types/KeywordPage/46c4b0dfb674825f9579203d41e7f404.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/types/keyword.asciidoc:20 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line20 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/KeywordPage.cs#L13-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Keyword(k => k - .Name("tags") - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/NestedPage/8baccd8688a6bad1749b8935f9601ea4.asciidoc b/examples/Mapping/Types/NestedPage/8baccd8688a6bad1749b8935f9601ea4.asciidoc deleted file mode 100644 index ec7d6b38b83..00000000000 --- a/examples/Mapping/Types/NestedPage/8baccd8688a6bad1749b8935f9601ea4.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// mapping/types/nested.asciidoc:22 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line22 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/NestedPage.cs#L14-L47. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new GroupDoc -{ - Group = "fans", - User = new List - { - new User { First = "John", Last = "Smith" }, - new User { First = "Alice", Last = "White" } - } -}, i => i -.Index("my_index") -.Id(1) -); ----- diff --git a/examples/Mapping/Types/NestedPage/b214942b938e47f2c486e523546cb574.asciidoc b/examples/Mapping/Types/NestedPage/b214942b938e47f2c486e523546cb574.asciidoc deleted file mode 100644 index a6bd63b5087..00000000000 --- a/examples/Mapping/Types/NestedPage/b214942b938e47f2c486e523546cb574.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// mapping/types/nested.asciidoc:58 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line58 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/NestedPage.cs#L49-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Match(m => m - .Field(f => f.User[0].First) //<1> - .Query("Alice") - ) && q - .Match(m => m - .Field(f => f.User[0].Last) //<2> - .Query("Smith") - ) - ) -); ----- -<1> An expression to build a path to the field `user.first` from the `GroupDoc` type. -<2> An expression to build a path to the field `user.last` from the `GroupDoc` type. diff --git a/examples/Mapping/Types/NestedPage/b919f88e6f47a40d5793479440a90ba6.asciidoc b/examples/Mapping/Types/NestedPage/b919f88e6f47a40d5793479440a90ba6.asciidoc deleted file mode 100644 index 4cd20782eaf..00000000000 --- a/examples/Mapping/Types/NestedPage/b919f88e6f47a40d5793479440a90ba6.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -// mapping/types/nested.asciidoc:85 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line85 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/NestedPage.cs#L86-L234. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Nested(n => n - .Name(nn => nn.User) - ) - ) - ) -); - -var indexResponse = client.Index(new GroupDoc -{ - Group = "fans", - User = new List - { - new User { First = "John", Last = "Smith" }, - new User { First = "Alice", Last = "White" } - } -}, i => i - .Index("my_index") - .Id(1) -); - -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Nested(n => n - .Path(p => p.User) - .Query(nq => nq - .Match(m => m - .Field(f => f.User[0].First) - .Query("Alice") - ) && nq - .Match(m => m - .Field(f => f.User[0].Last) - .Query("Smith") - ) - ) - ) - ) -); - -var searchResponse2 = client.Search(s => s - .Index("my_index") - .Query(q => q - .Nested(n => n - .Path(p => p.User) - .Query(nq => nq - .Match(m => m - .Field(f => f.User[0].First) - .Query("Alice") - ) && nq - .Match(m => m - .Field(f => f.User[0].Last) - .Query("White") - ) - ) - .InnerHits(i => i - .Highlight(h => h - .Fields(hf => hf - .Field(f => f.User[0].First) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/NumericPage/a71c438cc4df1cafe3109ccff475afdb.asciidoc b/examples/Mapping/Types/NumericPage/a71c438cc4df1cafe3109ccff475afdb.asciidoc deleted file mode 100644 index 6d6aff5dd53..00000000000 --- a/examples/Mapping/Types/NumericPage/a71c438cc4df1cafe3109ccff475afdb.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// mapping/types/numeric.asciidoc:22 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line22 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/NumericPage.cs#L13-L59. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Number(n => n - .Name("number_of_bytes") - .Type(NumberType.Integer) - ) - .Number(n => n - .Name("time_in_seconds") - .Type(NumberType.Float) - ) - .Number(n => n - .Name("price") - .Type(NumberType.ScaledFloat) - .ScalingFactor(100) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/SearchAsYouTypePage/0ced86822f8c0a479af5e1fe28dfc2ec.asciidoc b/examples/Mapping/Types/SearchAsYouTypePage/0ced86822f8c0a479af5e1fe28dfc2ec.asciidoc deleted file mode 100644 index 47115be514e..00000000000 --- a/examples/Mapping/Types/SearchAsYouTypePage/0ced86822f8c0a479af5e1fe28dfc2ec.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/types/search-as-you-type.asciidoc:147 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line147 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/SearchAsYouTypePage.cs#L106-L138. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .MatchPhrasePrefix(mpp => mpp - .Field(f => f.MyField) - .Query("brown f") - ) - ) -); ----- diff --git a/examples/Mapping/Types/SearchAsYouTypePage/6f31f9cfe0dd741ccad4af62ba8f815e.asciidoc b/examples/Mapping/Types/SearchAsYouTypePage/6f31f9cfe0dd741ccad4af62ba8f815e.asciidoc deleted file mode 100644 index 1dfdff9fa2e..00000000000 --- a/examples/Mapping/Types/SearchAsYouTypePage/6f31f9cfe0dd741ccad4af62ba8f815e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/types/search-as-you-type.asciidoc:18 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line18 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/SearchAsYouTypePage.cs#L16-L42. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .SearchAsYouType(t => t - .Name(n => n.MyField) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/SearchAsYouTypePage/867e5fad9c57055712fe2b69fa69a97c.asciidoc b/examples/Mapping/Types/SearchAsYouTypePage/867e5fad9c57055712fe2b69fa69a97c.asciidoc deleted file mode 100644 index 4f5aa098498..00000000000 --- a/examples/Mapping/Types/SearchAsYouTypePage/867e5fad9c57055712fe2b69fa69a97c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// mapping/types/search-as-you-type.asciidoc:71 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line71 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/SearchAsYouTypePage.cs#L44-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new MyDocument -{ - MyField = "quick brown fox jump lazy dog" -}, i => i - .Index("my_index") - .Id(1) - .Refresh(Refresh.True) -); ----- diff --git a/examples/Mapping/Types/SearchAsYouTypePage/9bd25962f177e86dbc5a8030a420cc31.asciidoc b/examples/Mapping/Types/SearchAsYouTypePage/9bd25962f177e86dbc5a8030a420cc31.asciidoc deleted file mode 100644 index 01a77122d56..00000000000 --- a/examples/Mapping/Types/SearchAsYouTypePage/9bd25962f177e86dbc5a8030a420cc31.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// mapping/types/search-as-you-type.asciidoc:87 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line87 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/SearchAsYouTypePage.cs#L69-L104. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var query = client.Search(s => s - .Index("my_index") - .Query(q => q - .MultiMatch(mm => mm - .Query("brown f") - .Type(TextQueryType.BoolPrefix) - .Fields(f => f - .Field(ff => ff.MyField) - .Field(ff => ff.MyField.Suffix("_2gram")) - .Field(ff => ff.MyField.Suffix("_3gram")) - ) - ) - ) -); ----- diff --git a/examples/Mapping/Types/TextPage/24ea1c6cdf10165228951e562b7ec0ef.asciidoc b/examples/Mapping/Types/TextPage/24ea1c6cdf10165228951e562b7ec0ef.asciidoc deleted file mode 100644 index c15b1040e2f..00000000000 --- a/examples/Mapping/Types/TextPage/24ea1c6cdf10165228951e562b7ec0ef.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// mapping/types/text.asciidoc:22 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line22 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Mapping/Types/TextPage.cs#L12-L34. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p.Text(t => t.Name("full_name"))) - ) -); ----- diff --git a/examples/QueryDsl/BoolQueryPage/06afce2955f9094d96d27067ebca32e8.asciidoc b/examples/QueryDsl/BoolQueryPage/06afce2955f9094d96d27067ebca32e8.asciidoc deleted file mode 100644 index 0d82da81f9e..00000000000 --- a/examples/QueryDsl/BoolQueryPage/06afce2955f9094d96d27067ebca32e8.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -// query-dsl/bool-query.asciidoc:36 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line36 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/BoolQueryPage.cs#L13-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Bool(b => b - .Must(m => m.Term(p => p.User, "kimchy")) - .Filter(f => f.Term(p => p.Tags, "tech")) - .MustNot(m => m - .Range(r => r - .Field(p => p.Age) - .GreaterThanOrEquals(10) - .LessThanOrEquals(20) - ) - ) - .Should( - sh => sh.Term(p => p.Tags, "wow"), - sh => sh.Term(p => p.Tags, "elasticsearch") - ) - .MinimumShouldMatch(1) - .Boost(1.0) - ) - ) -); ----- diff --git a/examples/QueryDsl/BoolQueryPage/162b5b693b713f0bfab1209d59443c46.asciidoc b/examples/QueryDsl/BoolQueryPage/162b5b693b713f0bfab1209d59443c46.asciidoc deleted file mode 100644 index b81d76a6fd3..00000000000 --- a/examples/QueryDsl/BoolQueryPage/162b5b693b713f0bfab1209d59443c46.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/bool-query.asciidoc:130 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line130 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/BoolQueryPage.cs#L155-L184. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.ConstantScore(cs => cs - .Filter(f => f - .Term(p => p.Status, PublishStatus.Active) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/BoolQueryPage/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc b/examples/QueryDsl/BoolQueryPage/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc deleted file mode 100644 index 394199818d2..00000000000 --- a/examples/QueryDsl/BoolQueryPage/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// query-dsl/bool-query.asciidoc:88 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line88 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/BoolQueryPage.cs#L86-L116. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => +q.Term(p => p.Status, PublishStatus.Active)) -); ----- diff --git a/examples/QueryDsl/BoolQueryPage/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc b/examples/QueryDsl/BoolQueryPage/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc deleted file mode 100644 index 59c204bfebb..00000000000 --- a/examples/QueryDsl/BoolQueryPage/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// query-dsl/bool-query.asciidoc:107 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line107 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/BoolQueryPage.cs#L118-L153. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - +q.Term(p => p.Status, PublishStatus.Active) - && q.MatchAll() - ) -); ----- diff --git a/examples/QueryDsl/ExistsQueryPage/3342c69b2c2303247217532956fcce85.asciidoc b/examples/QueryDsl/ExistsQueryPage/3342c69b2c2303247217532956fcce85.asciidoc deleted file mode 100644 index 4024d81ad71..00000000000 --- a/examples/QueryDsl/ExistsQueryPage/3342c69b2c2303247217532956fcce85.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// query-dsl/exists-query.asciidoc:20 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line20 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/ExistsQueryPage.cs#L12-L35. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Exists(e => e - .Field("user") - ) - ) -); ----- diff --git a/examples/QueryDsl/ExistsQueryPage/43af86de5e49aa06070092fffc138208.asciidoc b/examples/QueryDsl/ExistsQueryPage/43af86de5e49aa06070092fffc138208.asciidoc deleted file mode 100644 index b14e5f0e6f9..00000000000 --- a/examples/QueryDsl/ExistsQueryPage/43af86de5e49aa06070092fffc138208.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// query-dsl/exists-query.asciidoc:56 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line56 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/ExistsQueryPage.cs#L37-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => !q - .Exists(e => e - .Field("user") - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/645c4c6e209719d3a4d25b1a629cb23b.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/645c4c6e209719d3a4d25b1a629cb23b.asciidoc deleted file mode 100644 index 027d50a9ffa..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/645c4c6e209719d3a4d25b1a629cb23b.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// query-dsl/function-score-query.asciidoc:241 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line241 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L241-L277. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Functions(fun => fun - .RandomScore(rs => rs - .Seed(10) - .Field("_seq_no") - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc deleted file mode 100644 index e1ea4c69f39..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// query-dsl/function-score-query.asciidoc:269 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line269 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L279-L320. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Functions(fun => fun - .FieldValueFactor(fvf => fvf - .Field("likes") - .Factor(1.2) - .Modifier(FieldValueFactorModifier.SquareRoot) - .Missing(1) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/a42f33e15b0995bb4b6058659bfdea85.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/a42f33e15b0995bb4b6058659bfdea85.asciidoc deleted file mode 100644 index 9ff55f3d33a..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/a42f33e15b0995bb4b6058659bfdea85.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// query-dsl/function-score-query.asciidoc:19 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line19 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L15-L54. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Query(qq => qq - .MatchAll() - ) - .Functions(fun => fun - .RandomScore() - ) - .Boost(5) - .BoostMode(FunctionBoostMode.Multiply) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/b4a0d0ed512dffc10ee53bca2feca49b.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/b4a0d0ed512dffc10ee53bca2feca49b.asciidoc deleted file mode 100644 index d12ffa534f3..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/b4a0d0ed512dffc10ee53bca2feca49b.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -// query-dsl/function-score-query.asciidoc:41 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line41 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L56-L131. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Query(qq => qq - .MatchAll() - ) - .Boost(5) - .Functions(fun => fun - .RandomScore(rs => rs - .Filter(f => f - .Match(m => m - .Field("test") - .Query("bar") - ) - ) - .Weight(23) - ) - .Weight(rs => rs - .Filter(f => f - .Match(m => m - .Field("test") - .Query("cat") - ) - ) - .Weight(42) - ) - ) - .MaxBoost(42) - .BoostMode(FunctionBoostMode.Multiply) - .ScoreMode(FunctionScoreMode.Max) - .MinScore(42) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc deleted file mode 100644 index 9d62f3ba617..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -// query-dsl/function-score-query.asciidoc:175 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line175 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L183-L239. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Query(qq => qq - .Match(m => m - .Field("message") - .Query("elasticsearch") - ) - ) - .Functions(fun => fun - .ScriptScore(ss => ss - .Script(sc => sc - .Source("params.a / Math.pow(params.b, doc['likes'].value)") - .Params(p => p - .Add("a", 5) - .Add("b", 1.2) - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/df17f920b0deab3529b98df88b781f55.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/df17f920b0deab3529b98df88b781f55.asciidoc deleted file mode 100644 index f034a202b38..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/df17f920b0deab3529b98df88b781f55.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -// query-dsl/function-score-query.asciidoc:578 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line578 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L367-L437. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Functions(fun => fun - .Gauss(g => g - .Field("price") - .Origin(0) - .Scale(20) - ) - .GaussGeoLocation(g => g - .Field("location") - .Origin(new GeoLocation(11, 12)) - .Scale("2km") - ) - ) - .Query(qq => qq - .Match(mm => mm - .Field("properties") - .Query("balcony") - ) - ) - .ScoreMode(FunctionScoreMode.Multiply) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/ec27afee074001b0e4e393611010842b.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/ec27afee074001b0e4e393611010842b.asciidoc deleted file mode 100644 index 570359cba81..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/ec27afee074001b0e4e393611010842b.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// query-dsl/function-score-query.asciidoc:380 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line380 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L322-L365. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Functions(fun => fun - .GaussDate(g => g - .Field("date") - .Origin("2013-09-17") - .Scale("10d") - .Offset("5d") - .Decay(0.5) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/FunctionScoreQueryPage/ec473de07fe89bcbac1f8e278617fe46.asciidoc b/examples/QueryDsl/FunctionScoreQueryPage/ec473de07fe89bcbac1f8e278617fe46.asciidoc deleted file mode 100644 index f67edde133c..00000000000 --- a/examples/QueryDsl/FunctionScoreQueryPage/ec473de07fe89bcbac1f8e278617fe46.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -// query-dsl/function-score-query.asciidoc:137 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line137 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/FunctionScoreQueryPage.cs#L133-L181. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .FunctionScore(fs => fs - .Query(qq => qq - .Match(m => m - .Field("message") - .Query("elasticsearch") - ) - ) - .Functions(fun => fun - .ScriptScore(ss => ss - .Script(sc => sc - .Source("Math.log(2 + doc['likes'].value)") - ) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchAllQueryPage/09d617863a103c82fb4101e6165ea7fe.asciidoc b/examples/QueryDsl/MatchAllQueryPage/09d617863a103c82fb4101e6165ea7fe.asciidoc deleted file mode 100644 index e356dc9b5f3..00000000000 --- a/examples/QueryDsl/MatchAllQueryPage/09d617863a103c82fb4101e6165ea7fe.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// query-dsl/match-all-query.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchAllQueryPage.cs#L12-L28. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .MatchAll(m => m)); ----- diff --git a/examples/QueryDsl/MatchAllQueryPage/75330ec1305d2beb0e2f34d2195464e2.asciidoc b/examples/QueryDsl/MatchAllQueryPage/75330ec1305d2beb0e2f34d2195464e2.asciidoc deleted file mode 100644 index 6d3569fb743..00000000000 --- a/examples/QueryDsl/MatchAllQueryPage/75330ec1305d2beb0e2f34d2195464e2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// query-dsl/match-all-query.asciidoc:23 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line23 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchAllQueryPage.cs#L30-L46. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .MatchAll(m => m.Boost(1.2))); ----- diff --git a/examples/QueryDsl/MatchAllQueryPage/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc b/examples/QueryDsl/MatchAllQueryPage/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc deleted file mode 100644 index a8310c37b72..00000000000 --- a/examples/QueryDsl/MatchAllQueryPage/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// query-dsl/match-all-query.asciidoc:39 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line39 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchAllQueryPage.cs#L48-L65. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q.MatchNone()) -); ----- diff --git a/examples/QueryDsl/MatchPhraseQueryPage/72231b7debac60c95b9869a97dafda3a.asciidoc b/examples/QueryDsl/MatchPhraseQueryPage/72231b7debac60c95b9869a97dafda3a.asciidoc deleted file mode 100644 index 0b6d8cc8316..00000000000 --- a/examples/QueryDsl/MatchPhraseQueryPage/72231b7debac60c95b9869a97dafda3a.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/match-phrase-query.asciidoc:30 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line30 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchPhraseQueryPage.cs#L39-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .MatchPhrase(mp => mp - .Field("message") - .Query("this is a test") - .Analyzer("my_analyzer") - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchPhraseQueryPage/83f95657beca9bf5d8264c80c7fb463f.asciidoc b/examples/QueryDsl/MatchPhraseQueryPage/83f95657beca9bf5d8264c80c7fb463f.asciidoc deleted file mode 100644 index ecb5faebb0f..00000000000 --- a/examples/QueryDsl/MatchPhraseQueryPage/83f95657beca9bf5d8264c80c7fb463f.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/match-phrase-query.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchPhraseQueryPage.cs#L13-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .MatchPhrase(mp => mp - .Field("message") - .Query("this is a test") - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/0ac9916f47a2483b89c1416684af322a.asciidoc b/examples/QueryDsl/MatchQueryPage/0ac9916f47a2483b89c1416684af322a.asciidoc deleted file mode 100644 index cc209b071aa..00000000000 --- a/examples/QueryDsl/MatchQueryPage/0ac9916f47a2483b89c1416684af322a.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/match-query.asciidoc:241 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line241 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L133-L163. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("to be or not to be") - .Operator(Operator.And) - .ZeroTermsQuery(ZeroTermsQuery.All) - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/5043b83a89091fa00edb341ddf7ba370.asciidoc b/examples/QueryDsl/MatchQueryPage/5043b83a89091fa00edb341ddf7ba370.asciidoc deleted file mode 100644 index c6f9a5f6ef3..00000000000 --- a/examples/QueryDsl/MatchQueryPage/5043b83a89091fa00edb341ddf7ba370.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/match-query.asciidoc:219 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line219 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L103-L131. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("this is a testt") - .Fuzziness(Fuzziness.Auto) - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/6138d6919f3cbaaf61e1092f817d295c.asciidoc b/examples/QueryDsl/MatchQueryPage/6138d6919f3cbaaf61e1092f817d295c.asciidoc deleted file mode 100644 index 9bc8fd41e2a..00000000000 --- a/examples/QueryDsl/MatchQueryPage/6138d6919f3cbaaf61e1092f817d295c.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/match-query.asciidoc:175 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line175 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L73-L101. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("this is a test") - .Operator(Operator.And) - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc b/examples/QueryDsl/MatchQueryPage/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc deleted file mode 100644 index b2e804bd179..00000000000 --- a/examples/QueryDsl/MatchQueryPage/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/match-query.asciidoc:268 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line268 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L165-L193. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("ny city") - .AutoGenerateSynonymsPhraseQuery(false) - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc b/examples/QueryDsl/MatchQueryPage/e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc deleted file mode 100644 index f74234cfeb5..00000000000 --- a/examples/QueryDsl/MatchQueryPage/e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/match-query.asciidoc:18 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line18 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L13-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("this is a test") - ) - ) -); ----- diff --git a/examples/QueryDsl/MatchQueryPage/fa2fe60f570bd930d2891778c6efbfe6.asciidoc b/examples/QueryDsl/MatchQueryPage/fa2fe60f570bd930d2891778c6efbfe6.asciidoc deleted file mode 100644 index c1d9e034c75..00000000000 --- a/examples/QueryDsl/MatchQueryPage/fa2fe60f570bd930d2891778c6efbfe6.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/match-query.asciidoc:150 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line150 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MatchQueryPage.cs#L41-L71. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("message") - .Query("this is a test") - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/047266b0d20fdb62ebc72d51952c8f6d.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/047266b0d20fdb62ebc72d51952c8f6d.asciidoc deleted file mode 100644 index dd72a6edd38..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/047266b0d20fdb62ebc72d51952c8f6d.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:341 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line341 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L324-L353. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("Will Smith") - .Type(TextQueryType.CrossFields) - .Fields(new[] { "first_name", "last_name" }) - .Operator(Operator.And) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/0e118857b815b62118a30c042f079db1.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/0e118857b815b62118a30c042f079db1.asciidoc deleted file mode 100644 index 58bb5d6de96..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/0e118857b815b62118a30c042f079db1.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:259 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line259 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L260-L287. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("quick brown f") - .Type(TextQueryType.PhrasePrefix) - .Fields(new[] { "subject", "message" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/179f0a3e84ff4bbac18787a018eabf89.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/179f0a3e84ff4bbac18787a018eabf89.asciidoc deleted file mode 100644 index 3dadf36e5b0..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/179f0a3e84ff4bbac18787a018eabf89.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:472 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line472 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L440-L469. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("Jon") - .Type(TextQueryType.CrossFields) - .Analyzer("standard") - .Fields(new[] { "first", "last", "*.edge" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/33f148e3d8676de6cc52f58749898a13.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/33f148e3d8676de6cc52f58749898a13.asciidoc deleted file mode 100644 index 45a8fcaa032..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/33f148e3d8676de6cc52f58749898a13.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:275 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line275 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L289-L322. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.DisMax(c => c - .Queries( - qs => qs.MatchPhrasePrefix(m => m.Field("subject").Query("quick brown f")), - qs => qs.MatchPhrasePrefix(m => m.Field("message").Query("quick brown f")) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc deleted file mode 100644 index 0b2abbe3769..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:438 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line438 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L387-L438. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.Bool(b => - b.Should( - s => s.MultiMatch(c => c - .Query("Will Smith") - .Type(TextQueryType.CrossFields) - .Fields(new[] { "first", "last" }) - .MinimumShouldMatch(MinimumShouldMatch.Percentage(50)) - ), - s => s.MultiMatch(c => c - .Query("Will Smith") - .Type(TextQueryType.CrossFields) - .Fields("*.edge") - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/53b908c3432118c5a6e460f74d32006b.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/53b908c3432118c5a6e460f74d32006b.asciidoc deleted file mode 100644 index 5735b0eda4d..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/53b908c3432118c5a6e460f74d32006b.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L13-L38. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("this is a test") - .Fields(new[] { "subject", "message" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/5da6efd5b038ada64c9e853c88c1ec47.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/5da6efd5b038ada64c9e853c88c1ec47.asciidoc deleted file mode 100644 index 3ad1aabe52e..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/5da6efd5b038ada64c9e853c88c1ec47.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:113 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line113 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L94-L123. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("brown fox") - .Type(TextQueryType.BestFields) - .Fields(new[] { "subject", "message" }) - .TieBreaker(0.3) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/68721288dc9ad8aa1b55099b4d303051.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/68721288dc9ad8aa1b55099b4d303051.asciidoc deleted file mode 100644 index b795681313d..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/68721288dc9ad8aa1b55099b4d303051.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:524 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line524 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L471-L498. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("quick brown f") - .Type(TextQueryType.BoolPrefix) - .Fields(new[] { "subject", "message" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/6a1702dd50690cae833572e48a0ddf25.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/6a1702dd50690cae833572e48a0ddf25.asciidoc deleted file mode 100644 index 23b5086250a..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/6a1702dd50690cae833572e48a0ddf25.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:33 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line33 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L40-L65. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("Will Smith") - .Fields("title, *_name") - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc deleted file mode 100644 index 763b9fb8526..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:228 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line228 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L222-L258. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.Bool(c => c - .Should( - qs => qs.Match(m => m.Field("title").Query("quick brown fox")), - qs => qs.Match(m => m.Field("title.original").Query("quick brown fox")), - qs => qs.Match(m => m.Field("title.shingles").Query("quick brown fox")) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/7b908b1189f076942de8cd497ff1fa59.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/7b908b1189f076942de8cd497ff1fa59.asciidoc deleted file mode 100644 index 492d1028f61..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/7b908b1189f076942de8cd497ff1fa59.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:212 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line212 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L193-L220. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("quick brown fox") - .Type(TextQueryType.MostFields) - .Fields(new[] { "title", "title.original", "title.shingles" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc deleted file mode 100644 index d459e5bb07a..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:400 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line400 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L355-L385. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("Jon") - .Type(TextQueryType.CrossFields) - .Fields(new[] { "first", "first.edge", "last", "last.edge" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc deleted file mode 100644 index a9923a9d7ac..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:130 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line130 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L125-L160. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.DisMax(c => c - .Queries( - qs => qs.Match(m => m.Field("subject").Query("brown fox")), - qs => qs.Match(m => m.Field("message").Query("brown fox")) - ) - .TieBreaker(0.3) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/e270f3f721a5712cd11a5ca03554f5b0.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/e270f3f721a5712cd11a5ca03554f5b0.asciidoc deleted file mode 100644 index 77496178bd0..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/e270f3f721a5712cd11a5ca03554f5b0.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:170 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line170 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L162-L191. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("Will Smith") - .Type(TextQueryType.BestFields) - .Fields(new[] { "first_name", "last_name" }) - .Operator(Operator.And) - ) - ) -); ----- diff --git a/examples/QueryDsl/MultiMatchQueryPage/e30ea6e3823a139d7693d8cce1920a06.asciidoc b/examples/QueryDsl/MultiMatchQueryPage/e30ea6e3823a139d7693d8cce1920a06.asciidoc deleted file mode 100644 index 64a92cca811..00000000000 --- a/examples/QueryDsl/MultiMatchQueryPage/e30ea6e3823a139d7693d8cce1920a06.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/multi-match-query.asciidoc:50 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line50 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/MultiMatchQueryPage.cs#L67-L92. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.MultiMatch(c => c - .Query("this is a test") - .Fields(new[] { "subject^3", "message" }) - ) - ) -); ----- diff --git a/examples/QueryDsl/NestedQueryPage/0bd3923424a20a4ba860b0774b9991b1.asciidoc b/examples/QueryDsl/NestedQueryPage/0bd3923424a20a4ba860b0774b9991b1.asciidoc deleted file mode 100644 index b89690db108..00000000000 --- a/examples/QueryDsl/NestedQueryPage/0bd3923424a20a4ba860b0774b9991b1.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -// query-dsl/nested-query.asciidoc:206 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line206 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/NestedQueryPage.cs#L235-L290. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("drivers") - .Query(q => q - .Nested(nq => nq - .Path(p => p.Driver) - .Query(qq => qq - .Nested(nnq => nnq - .Path(p => p.Driver.Vehicle) - .Query(qqq => qqq - .Match(m => m - .Field(f => f.Driver.Vehicle.First().Make) - .Query("Powell Motors") - ) && q - .Match(m => m - .Field(f => f.Driver.Vehicle.First().Model) - .Query("Canyonero") - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/NestedQueryPage/54092c8c646133f5dbbc047990dd458d.asciidoc b/examples/QueryDsl/NestedQueryPage/54092c8c646133f5dbbc047990dd458d.asciidoc deleted file mode 100644 index bcff79bf25f..00000000000 --- a/examples/QueryDsl/NestedQueryPage/54092c8c646133f5dbbc047990dd458d.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -// query-dsl/nested-query.asciidoc:133 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line133 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/NestedQueryPage.cs#L92-L150. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("drivers", c => c - .Map(m => m - .Properties(p => p - .Nested(n => n - .Name(nn => nn.Driver) - .Properties(p => p - .Text(t => t - .Name(n => n.LastName) - ) - .Nested(n => n - .Name(nn => nn.Vehicle) - .Properties(pp => pp - .Text(t => t - .Name(nn => nn.Make) - ) - .Text(t => t - .Name(nn => nn.Model) - ) - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/NestedQueryPage/6be70810d6ebd6f09d8a49f9df847765.asciidoc b/examples/QueryDsl/NestedQueryPage/6be70810d6ebd6f09d8a49f9df847765.asciidoc deleted file mode 100644 index acace47fdfb..00000000000 --- a/examples/QueryDsl/NestedQueryPage/6be70810d6ebd6f09d8a49f9df847765.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// query-dsl/nested-query.asciidoc:41 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line41 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/NestedQueryPage.cs#L44-L90. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Query(q => q - .Nested(n => n - .Path("obj1") - .Query(nq => nq - .Match(m => m - .Field("obj1.name") - .Query("blue") - ) && q - .LongRange(r => r - .Field("obj1.count") - .GreaterThan(5) - ) - ) - .ScoreMode(NestedScoreMode.Average) - ) - ) -); ----- diff --git a/examples/QueryDsl/NestedQueryPage/873fbbc6ab81409058591385fd602736.asciidoc b/examples/QueryDsl/NestedQueryPage/873fbbc6ab81409058591385fd602736.asciidoc deleted file mode 100644 index fdf8e7df145..00000000000 --- a/examples/QueryDsl/NestedQueryPage/873fbbc6ab81409058591385fd602736.asciidoc +++ /dev/null @@ -1,58 +0,0 @@ -// query-dsl/nested-query.asciidoc:165 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line165 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/NestedQueryPage.cs#L152-L233. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new DriverDocument -{ - Driver = new Driver - { - LastName = "McQueen", - Vehicle = new[] - { - new Vehicle - { - Make = "Powell Motors", - Model = "Canyonero" - }, - new Vehicle - { - Make = "Miller-Meteor", - Model = "Ecto-1" - } - } - } -}, i => i.Id(1).Index("drivers")); - -var indexResponse2 = client.Index(new DriverDocument -{ - Driver = new Driver - { - LastName = "Hudson", - Vehicle = new[] - { - new Vehicle - { - Make = "Mifune", - Model = "Mach Five" - }, - new Vehicle - { - Make = "Miller-Meteor", - Model = "Ecto-1" - } - } - } -}, i => i.Id(2).Index("drivers")); ----- diff --git a/examples/QueryDsl/NestedQueryPage/c612d93e7f682a0d731e385edf9f5d56.asciidoc b/examples/QueryDsl/NestedQueryPage/c612d93e7f682a0d731e385edf9f5d56.asciidoc deleted file mode 100644 index c45bb664204..00000000000 --- a/examples/QueryDsl/NestedQueryPage/c612d93e7f682a0d731e385edf9f5d56.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/nested-query.asciidoc:23 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line23 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/NestedQueryPage.cs#L16-L42. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Nested(n => n - .Name("obj1") - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryFilterContextPage/f29a28fffa7ec604a33a838f48f7ea79.asciidoc b/examples/QueryDsl/QueryFilterContextPage/f29a28fffa7ec604a33a838f48f7ea79.asciidoc deleted file mode 100644 index 40733caee39..00000000000 --- a/examples/QueryDsl/QueryFilterContextPage/f29a28fffa7ec604a33a838f48f7ea79.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/query_filter_context.asciidoc:62 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line62 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryFilterContextPage.cs#L13-L57. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => - q.Match(m => m.Field(p => p.Title).Query("Search")) - && q.Match(m => m.Field(p => p.Content).Query("Elasticsearch")) - && +q.Term(m => m.Field(p => p.Status).Value(PublishStatus.Published)) - && +q.DateRange(m => m - .Field(p => p.PublishDate) - .GreaterThanOrEquals("2015-01-01") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc b/examples/QueryDsl/QueryStringQueryPage/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc deleted file mode 100644 index f0d513a7716..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/query-string-query.asciidoc:316 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line316 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L134-L161. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("city.*") - ) - .Query("this AND that OR thus") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/58b5003c0a53a39bf509aa3797aad471.asciidoc b/examples/QueryDsl/QueryStringQueryPage/58b5003c0a53a39bf509aa3797aad471.asciidoc deleted file mode 100644 index e94b6851403..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/58b5003c0a53a39bf509aa3797aad471.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/query-string-query.asciidoc:352 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line352 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L188-L216. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("content") - .Field("name.*^5") - ) - .Query("this AND that OR thus") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/60ee33f3acfdd0fe6f288ac77312c780.asciidoc b/examples/QueryDsl/QueryStringQueryPage/60ee33f3acfdd0fe6f288ac77312c780.asciidoc deleted file mode 100644 index b0313c792ee..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/60ee33f3acfdd0fe6f288ac77312c780.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/query-string-query.asciidoc:446 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line446 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L247-L278. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("title") - ) - .Query("this that thus") - .MinimumShouldMatch(2) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/6f21a878fee3b43c5332b81aaddbeac7.asciidoc b/examples/QueryDsl/QueryStringQueryPage/6f21a878fee3b43c5332b81aaddbeac7.asciidoc deleted file mode 100644 index d5b9ee407bf..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/6f21a878fee3b43c5332b81aaddbeac7.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// query-dsl/query-string-query.asciidoc:528 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line528 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L350-L385. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("title") - .Field("content") - ) - .Query("this OR that OR thus") - .Type(TextQueryType.CrossFields) - .MinimumShouldMatch(2) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/a2a25aad1fea9a541b52ac613c78fb64.asciidoc b/examples/QueryDsl/QueryStringQueryPage/a2a25aad1fea9a541b52ac613c78fb64.asciidoc deleted file mode 100644 index 5195f8f1e72..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/a2a25aad1fea9a541b52ac613c78fb64.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// query-dsl/query-string-query.asciidoc:297 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line297 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L96-L132. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("content") - .Field("name^5") - ) - .Query("this AND that OR thus") - .TieBreaker(0) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc b/examples/QueryDsl/QueryStringQueryPage/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc deleted file mode 100644 index 976f70f1472..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/query-string-query.asciidoc:42 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line42 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L14-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("(new york city) OR (big apple)") - .DefaultField(p => p.Content) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/be1bd47393646ac6bbee177d1cdb7738.asciidoc b/examples/QueryDsl/QueryStringQueryPage/be1bd47393646ac6bbee177d1cdb7738.asciidoc deleted file mode 100644 index 6aa01832f67..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/be1bd47393646ac6bbee177d1cdb7738.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// query-dsl/query-string-query.asciidoc:472 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line472 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L280-L313. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("title") - .Field("content") - ) - .Query("this that thus") - .MinimumShouldMatch(2) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/db6cba451ba562abe953d09ad80cc15c.asciidoc b/examples/QueryDsl/QueryStringQueryPage/db6cba451ba562abe953d09ad80cc15c.asciidoc deleted file mode 100644 index 3e25063abb2..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/db6cba451ba562abe953d09ad80cc15c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// query-dsl/query-string-query.asciidoc:333 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line333 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L163-L186. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("city.\\*:(this AND that OR thus)") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc b/examples/QueryDsl/QueryStringQueryPage/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc deleted file mode 100644 index 0ede2b0516f..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -// query-dsl/query-string-query.asciidoc:281 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line281 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L71-L94. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("(content:this OR name:this) AND (content:that OR name:that)") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc b/examples/QueryDsl/QueryStringQueryPage/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc deleted file mode 100644 index 9e1845b395e..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// query-dsl/query-string-query.asciidoc:265 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line265 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L41-L69. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("content") - .Field("name") - ) - .Query("this AND that") - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc b/examples/QueryDsl/QueryStringQueryPage/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc deleted file mode 100644 index ac52f47bf72..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/query-string-query.asciidoc:418 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line418 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L218-L245. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .DefaultField("title") - .Query("ny city") - .AutoGenerateSynonymsPhraseQuery(false) - ) - ) -); ----- diff --git a/examples/QueryDsl/QueryStringQueryPage/fdd38f0d248385a444c777e7acd97846.asciidoc b/examples/QueryDsl/QueryStringQueryPage/fdd38f0d248385a444c777e7acd97846.asciidoc deleted file mode 100644 index 68ddcc2c5b5..00000000000 --- a/examples/QueryDsl/QueryStringQueryPage/fdd38f0d248385a444c777e7acd97846.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// query-dsl/query-string-query.asciidoc:496 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line496 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/QueryStringQueryPage.cs#L315-L348. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Fields(f => f - .Field("title") - .Field("content") - ) - .Query("this OR that OR thus") - .MinimumShouldMatch(2) - ) - ) -); ----- diff --git a/examples/QueryDsl/TermQueryPage/2a1de18774f9c68cafa169847832b2bc.asciidoc b/examples/QueryDsl/TermQueryPage/2a1de18774f9c68cafa169847832b2bc.asciidoc deleted file mode 100644 index 7af722759c0..00000000000 --- a/examples/QueryDsl/TermQueryPage/2a1de18774f9c68cafa169847832b2bc.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// query-dsl/term-query.asciidoc:94 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line94 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermQueryPage.cs#L38-L59. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Text(t => t.Name("full_text"))) - ) -); ----- diff --git a/examples/QueryDsl/TermQueryPage/a80f5db4357bb25b8704d374c18318ed.asciidoc b/examples/QueryDsl/TermQueryPage/a80f5db4357bb25b8704d374c18318ed.asciidoc deleted file mode 100644 index e5e62eca449..00000000000 --- a/examples/QueryDsl/TermQueryPage/a80f5db4357bb25b8704d374c18318ed.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// query-dsl/term-query.asciidoc:165 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line165 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermQueryPage.cs#L100-L123. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Query(q => q - .Match(m => m.Field("full_text").Query("Quick Brown Foxes!"))) - .Index("my_index") -); ----- diff --git a/examples/QueryDsl/TermQueryPage/cdedd5f33f7e5f7acde561e97bff61de.asciidoc b/examples/QueryDsl/TermQueryPage/cdedd5f33f7e5f7acde561e97bff61de.asciidoc deleted file mode 100644 index e8edcfca0e9..00000000000 --- a/examples/QueryDsl/TermQueryPage/cdedd5f33f7e5f7acde561e97bff61de.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// query-dsl/term-query.asciidoc:132 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line132 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermQueryPage.cs#L75-L98. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Query(q => q - .Term("full_text", "Quick Brown Foxes!")) - .Index("my_index") -); ----- diff --git a/examples/QueryDsl/TermQueryPage/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc b/examples/QueryDsl/TermQueryPage/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc deleted file mode 100644 index dd784ec11ca..00000000000 --- a/examples/QueryDsl/TermQueryPage/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// query-dsl/term-query.asciidoc:28 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line28 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermQueryPage.cs#L13-L36. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Query(q => q - .Term(f => f.User, "Kimchy", 1.0)) - .AllIndices() -); ----- diff --git a/examples/QueryDsl/TermQueryPage/d4b4cefba4318caeba7480187faf2b13.asciidoc b/examples/QueryDsl/TermQueryPage/d4b4cefba4318caeba7480187faf2b13.asciidoc deleted file mode 100644 index 4b792957d9d..00000000000 --- a/examples/QueryDsl/TermQueryPage/d4b4cefba4318caeba7480187faf2b13.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// query-dsl/term-query.asciidoc:113 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line113 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermQueryPage.cs#L61-L73. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new { full_text = "Quick Brown Foxes!" }, i => i.Index("my_index").Id(1)); ----- diff --git a/examples/QueryDsl/TermsQueryPage/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc b/examples/QueryDsl/TermsQueryPage/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc deleted file mode 100644 index de25f089cc8..00000000000 --- a/examples/QueryDsl/TermsQueryPage/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// query-dsl/terms-query.asciidoc:19 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line19 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermsQueryPage.cs#L12-L38. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Terms(t => t - .Field("user") - .Terms("kimchy", "elasticsearch") - .Boost(1) - ) - ) -); ----- diff --git a/examples/QueryDsl/TermsQueryPage/8c5977410335d58217e0626618ce6641.asciidoc b/examples/QueryDsl/TermsQueryPage/8c5977410335d58217e0626618ce6641.asciidoc deleted file mode 100644 index 9f2452baca4..00000000000 --- a/examples/QueryDsl/TermsQueryPage/8c5977410335d58217e0626618ce6641.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// query-dsl/terms-query.asciidoc:160 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line160 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermsQueryPage.cs#L86-L104. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new -{ - color = "blue" -}, i => i -.Index("my_index") -.Id(2) -); ----- diff --git a/examples/QueryDsl/TermsQueryPage/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc b/examples/QueryDsl/TermsQueryPage/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc deleted file mode 100644 index 55b0fb7fcca..00000000000 --- a/examples/QueryDsl/TermsQueryPage/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// query-dsl/terms-query.asciidoc:127 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line127 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermsQueryPage.cs#L40-L64. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(p => p - .Properties(p => p - .Keyword(k => k - .Name("color") - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/TermsQueryPage/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc b/examples/QueryDsl/TermsQueryPage/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc deleted file mode 100644 index 952e2669cb3..00000000000 --- a/examples/QueryDsl/TermsQueryPage/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// query-dsl/terms-query.asciidoc:186 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line186 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermsQueryPage.cs#L106-L139. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Pretty() - .Query(q => q - .Terms(t => t - .Field("color") - .TermsLookup(l => l - .Index("my_index") - .Id("2") - .Path("color") - ) - ) - ) -); ----- diff --git a/examples/QueryDsl/TermsQueryPage/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc b/examples/QueryDsl/TermsQueryPage/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc deleted file mode 100644 index 3e43c15bbb8..00000000000 --- a/examples/QueryDsl/TermsQueryPage/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// query-dsl/terms-query.asciidoc:145 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line145 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/TermsQueryPage.cs#L66-L84. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new -{ - color = new[] { "blue", "green" } -}, i => i -.Index("my_index") -.Id(1) -); ----- diff --git a/examples/QueryDsl/WildcardQueryPage/d31062ff8c015387889fed4ad86fd914.asciidoc b/examples/QueryDsl/WildcardQueryPage/d31062ff8c015387889fed4ad86fd914.asciidoc deleted file mode 100644 index c0922512abc..00000000000 --- a/examples/QueryDsl/WildcardQueryPage/d31062ff8c015387889fed4ad86fd914.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// query-dsl/wildcard-query.asciidoc:21 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line21 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/QueryDsl/WildcardQueryPage.cs#L13-L43. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Wildcard(w => w - .Field("user") - .Value("ki*y") - .Boost(1) - .Rewrite(MultiTermQueryRewrite.ConstantScore) - ) - ) -); ----- diff --git a/examples/Root/AnalysisPage/7ffee3c2a5581994fc0ea59dd106d39f.asciidoc b/examples/Root/AnalysisPage/7ffee3c2a5581994fc0ea59dd106d39f.asciidoc deleted file mode 100644 index 20f4175b62a..00000000000 --- a/examples/Root/AnalysisPage/7ffee3c2a5581994fc0ea59dd106d39f.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// - -//// -IMPORTANT NOTE -============== -This file is generated from method Line42 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/AnalysisPage.cs#L11-L38. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("title") - .Analyzer("standard") - ) - ) - ) -); ----- diff --git a/examples/Root/ApiConventionsPage/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc b/examples/Root/ApiConventionsPage/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc deleted file mode 100644 index 22d1ecef6b1..00000000000 --- a/examples/Root/ApiConventionsPage/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// api-conventions.asciidoc:231 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line231 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L68-L81. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .QueryOnQueryString("elasticsearch") - .FilterPath("took", "hits.hits._id", "hits.hits._score") //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/1252fa45847edba5ec2b2f33da70ec5b.asciidoc b/examples/Root/ApiConventionsPage/1252fa45847edba5ec2b2f33da70ec5b.asciidoc deleted file mode 100644 index b3f0d299928..00000000000 --- a/examples/Root/ApiConventionsPage/1252fa45847edba5ec2b2f33da70ec5b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// api-conventions.asciidoc:282 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line282 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L96-L107. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var stateResponse = client.Cluster.State(selector: c => c - .FilterPath("routing_table.indices.**.state") //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc b/examples/Root/ApiConventionsPage/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc deleted file mode 100644 index 196feeab36a..00000000000 --- a/examples/Root/ApiConventionsPage/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// api-conventions.asciidoc:259 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line259 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L83-L94. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var stateResponse = client.Cluster.State(selector: c => c - .FilterPath("metadata.indices.*.stat*") //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc b/examples/Root/ApiConventionsPage/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc deleted file mode 100644 index acd411f9b5c..00000000000 --- a/examples/Root/ApiConventionsPage/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// api-conventions.asciidoc:326 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line326 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L126-L137. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var stateResponse = client.Cluster.State(selector: c => c - .FilterPath("metadata.indices.*.state,-metadata.indices.logstash-*") //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/5925c23a173a63bdb30b458248d1df76.asciidoc b/examples/Root/ApiConventionsPage/5925c23a173a63bdb30b458248d1df76.asciidoc deleted file mode 100644 index 55da20abde7..00000000000 --- a/examples/Root/ApiConventionsPage/5925c23a173a63bdb30b458248d1df76.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// api-conventions.asciidoc:416 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line416 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L218-L229. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.GetSettings("twitter", s => s - .FlatSettings(false) -); ----- diff --git a/examples/Root/ApiConventionsPage/621665fdbd7fc103c09bfeed28b67b1a.asciidoc b/examples/Root/ApiConventionsPage/621665fdbd7fc103c09bfeed28b67b1a.asciidoc deleted file mode 100644 index e98950c2a44..00000000000 --- a/examples/Root/ApiConventionsPage/621665fdbd7fc103c09bfeed28b67b1a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// api-conventions.asciidoc:307 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line307 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L109-L124. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var countResponse = client.Count(c => c - .AllIndices() - .FilterPath("-_shards") //<1> -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/6464124d1677f4552ddddd95a340ca3a.asciidoc b/examples/Root/ApiConventionsPage/6464124d1677f4552ddddd95a340ca3a.asciidoc deleted file mode 100644 index bceaf91ed08..00000000000 --- a/examples/Root/ApiConventionsPage/6464124d1677f4552ddddd95a340ca3a.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -// api-conventions.asciidoc:353 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line353 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L139-L203. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse1 = client.Index(new -{ - title = "Book #1", - rating = 200.1 -}, i => i.Index("library").Refresh(Refresh.True)); - -var indexResponse2 = client.Index(new -{ - title = "Book #2", - rating = 1.7 -}, i => i.Index("library").Refresh(Refresh.True)); - -var indexResponse3 = client.Index(new -{ - title = "Book #3", - rating = 0.1 -}, i => i.Index("library").Refresh(Refresh.True)); - -var searchResponse = client.Search(s => s - .AllIndices() - .FilterPath("hits.hits._source") //<1> - .Source(so => so - .Includes(f => f.Field("title")) - ) - .Sort(so => so - .Field("rating", SortOrder.Descending) - ) -); ----- -<1> Using filter path can result in a response that cannot be parsed by the client's serializer. In these cases, using the low level client and parsing the JSON response may be preferred. diff --git a/examples/Root/ApiConventionsPage/6d1e75312a28a5ba23837abf768f2510.asciidoc b/examples/Root/ApiConventionsPage/6d1e75312a28a5ba23837abf768f2510.asciidoc deleted file mode 100644 index 7b85b44c9cc..00000000000 --- a/examples/Root/ApiConventionsPage/6d1e75312a28a5ba23837abf768f2510.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// api-conventions.asciidoc:612 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line612 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L247-L261. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => -{ -IRequest request = s; -request.RequestParameters.SetQueryString("size", "surprise_me"); //<1> - return s.Index("twitter").ErrorTrace(); -}); ----- -<1> The high level client provides a strongly typed method to set "size" which does not allow a string value to be set. This can be circumvented by accessing the underlying request interface diff --git a/examples/Root/ApiConventionsPage/978088f989d45dd09339582e9cbc60e0.asciidoc b/examples/Root/ApiConventionsPage/978088f989d45dd09339582e9cbc60e0.asciidoc deleted file mode 100644 index 1e2a80bc415..00000000000 --- a/examples/Root/ApiConventionsPage/978088f989d45dd09339582e9cbc60e0.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// api-conventions.asciidoc:88 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line88 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L16-L40. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("") - .Query(q => q - .Match(m => m - .Field("test") - .Query("data") - ) - ) -); ----- diff --git a/examples/Root/ApiConventionsPage/a34d70d7022eb4ba48909d440c80390f.asciidoc b/examples/Root/ApiConventionsPage/a34d70d7022eb4ba48909d440c80390f.asciidoc deleted file mode 100644 index 8eb3c258b1d..00000000000 --- a/examples/Root/ApiConventionsPage/a34d70d7022eb4ba48909d440c80390f.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// api-conventions.asciidoc:142 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line142 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L42-L66. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index(",,") - .Query(q => q - .Match(m => m - .Field("test") - .Query("data") - ) - ) -); ----- diff --git a/examples/Root/ApiConventionsPage/a6f8636b03cc5f677b7d89e750328612.asciidoc b/examples/Root/ApiConventionsPage/a6f8636b03cc5f677b7d89e750328612.asciidoc deleted file mode 100644 index 53a557eddff..00000000000 --- a/examples/Root/ApiConventionsPage/a6f8636b03cc5f677b7d89e750328612.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// api-conventions.asciidoc:580 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line580 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L231-L245. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => -{ -IRequest request = s; -request.RequestParameters.SetQueryString("size", "surprise_me"); //<1> - return s.Index("twitter"); -}); ----- -<1> The high level client provides a strongly typed method to set "size" which does not allow a string value to be set. This can be circumvented by accessing the underlying request interface diff --git a/examples/Root/ApiConventionsPage/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc b/examples/Root/ApiConventionsPage/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc deleted file mode 100644 index f558bf72f6e..00000000000 --- a/examples/Root/ApiConventionsPage/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// api-conventions.asciidoc:386 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line386 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/ApiConventionsPage.cs#L205-L216. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Indices.GetSettings("twitter", s => s - .FlatSettings() -); ----- diff --git a/examples/Root/GettingStartedPage/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc b/examples/Root/GettingStartedPage/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc deleted file mode 100644 index 9ee46b3bc06..00000000000 --- a/examples/Root/GettingStartedPage/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// getting-started.asciidoc:495 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line495 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L152-L179. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Query(q => q - .MatchPhrase(m => m - .Field(f => f.Address) - .Query("mill lane") - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/251ea12c1248385ab409906ac64d9ee9.asciidoc b/examples/Root/GettingStartedPage/251ea12c1248385ab409906ac64d9ee9.asciidoc deleted file mode 100644 index 60a87020ce4..00000000000 --- a/examples/Root/GettingStartedPage/251ea12c1248385ab409906ac64d9ee9.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// getting-started.asciidoc:544 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line544 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L230-L282. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Query(q => q - .Bool(b => b - .Must(mu => mu - .MatchAll() - ) - .Filter(f => f - .Range(r => r - .Field(ff => ff.Balance) - .GreaterThanOrEquals(20000) - .LessThanOrEquals(30000) - ) - ) - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/311c4b632a29b9ead63b02d01f10096b.asciidoc b/examples/Root/GettingStartedPage/311c4b632a29b9ead63b02d01f10096b.asciidoc deleted file mode 100644 index 42822daeed7..00000000000 --- a/examples/Root/GettingStartedPage/311c4b632a29b9ead63b02d01f10096b.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// getting-started.asciidoc:251 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line251 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L26-L44. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Customer -{ - Name = "John Doe" -}, i => i -.Index("customer") -.Id(1) -); ----- diff --git a/examples/Root/GettingStartedPage/3f3b3e207f79303ce6f86e03e928e062.asciidoc b/examples/Root/GettingStartedPage/3f3b3e207f79303ce6f86e03e928e062.asciidoc deleted file mode 100644 index 5afdcb9e619..00000000000 --- a/examples/Root/GettingStartedPage/3f3b3e207f79303ce6f86e03e928e062.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// getting-started.asciidoc:290 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line290 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L46-L57. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getResponse = client.Get(1, g => g - .Index("customer") -); ----- diff --git a/examples/Root/GettingStartedPage/47bb632c6091ad0cd94bc660bdd309a5.asciidoc b/examples/Root/GettingStartedPage/47bb632c6091ad0cd94bc660bdd309a5.asciidoc deleted file mode 100644 index 235a5e3dc9e..00000000000 --- a/examples/Root/GettingStartedPage/47bb632c6091ad0cd94bc660bdd309a5.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// getting-started.asciidoc:512 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line512 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L181-L228. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Query(q => q - .Bool(b => b - .Must(mu => mu - .Match(m => m - .Field(f => f.Age) - .Query("40") - ) - ) - .MustNot(mn => mn - .Match(m => m - .Field(ff => ff.State) - .Query("ID") - ) - ) - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/4b90feb9d5d3dbfce424dac0341320b7.asciidoc b/examples/Root/GettingStartedPage/4b90feb9d5d3dbfce424dac0341320b7.asciidoc deleted file mode 100644 index 13e1f8f0714..00000000000 --- a/examples/Root/GettingStartedPage/4b90feb9d5d3dbfce424dac0341320b7.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// getting-started.asciidoc:461 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line461 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L88-L121. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var response0 = client.Search(s => s - .Index("bank") - .Query(q => q.MatchAll()) - .Sort(so => so - .Field(f => f.AccountNumber, SortOrder.Ascending) - ) - .From(10) - .Size(10) -); ----- diff --git a/examples/Root/GettingStartedPage/506844befdc5691d835771bcbb1c1a60.asciidoc b/examples/Root/GettingStartedPage/506844befdc5691d835771bcbb1c1a60.asciidoc deleted file mode 100644 index e53d220654f..00000000000 --- a/examples/Root/GettingStartedPage/506844befdc5691d835771bcbb1c1a60.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// getting-started.asciidoc:392 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line392 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L59-L86. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .MatchAll() - .Sort(so => so.Ascending(f => f.AccountNumber)) -); ----- diff --git a/examples/Root/GettingStartedPage/645796e8047967ca4a7635a22a876f4c.asciidoc b/examples/Root/GettingStartedPage/645796e8047967ca4a7635a22a876f4c.asciidoc deleted file mode 100644 index 98354a3b047..00000000000 --- a/examples/Root/GettingStartedPage/645796e8047967ca4a7635a22a876f4c.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// getting-started.asciidoc:691 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line691 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L354-L407. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Size(0) - .Aggregations(a => a - .Terms("group_by_state", ra => ra - .Field(f => f.State.Suffix("keyword")) - .Order(o => o - .Descending("average_balance") - ) - .Aggregations(aa => aa - .Average("average_balance", av => av - .Field(f => f.Balance) - ) - ) - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/cd247f267968aa0927bfdad56852f8f5.asciidoc b/examples/Root/GettingStartedPage/cd247f267968aa0927bfdad56852f8f5.asciidoc deleted file mode 100644 index 5f73b0409b3..00000000000 --- a/examples/Root/GettingStartedPage/cd247f267968aa0927bfdad56852f8f5.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// getting-started.asciidoc:482 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line482 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L123-L150. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Query(q => q - .Match(m => m - .Field(f => f.Address) - .Query("mill lane") - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc b/examples/Root/GettingStartedPage/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc deleted file mode 100644 index 728d4faf5b0..00000000000 --- a/examples/Root/GettingStartedPage/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// getting-started.asciidoc:665 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line665 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L313-L352. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Size(0) - .Aggregations(a => a - .Terms("group_by_state", ra => ra - .Field(f => f.State.Suffix("keyword")) - .Aggregations(aa => aa - .Average("average_balance", av => av - .Field(f => f.Balance) - ) - ) - ) - ) -); ----- diff --git a/examples/Root/GettingStartedPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc b/examples/Root/GettingStartedPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc deleted file mode 100644 index 33e40b54713..00000000000 --- a/examples/Root/GettingStartedPage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// getting-started.asciidoc:167 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line167 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L15-L24. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var catResponse = client.Cat.Health(h => h.Verbose()); ----- diff --git a/examples/Root/GettingStartedPage/feefeb68144002fd1fff57b77b95b85e.asciidoc b/examples/Root/GettingStartedPage/feefeb68144002fd1fff57b77b95b85e.asciidoc deleted file mode 100644 index 4fd33daaa74..00000000000 --- a/examples/Root/GettingStartedPage/feefeb68144002fd1fff57b77b95b85e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// getting-started.asciidoc:578 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line578 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/GettingStartedPage.cs#L284-L311. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("bank") - .Size(0) - .Aggregations(a => a - .Terms("group_by_state", ra => ra - .Field(f => f.State.Suffix("keyword")) - ) - ) -); ----- diff --git a/examples/Root/MappingPage/609260ad1d5998be2ca09ff1fe237efa.asciidoc b/examples/Root/MappingPage/609260ad1d5998be2ca09ff1fe237efa.asciidoc deleted file mode 100644 index f2a915b69a7..00000000000 --- a/examples/Root/MappingPage/609260ad1d5998be2ca09ff1fe237efa.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// mapping.asciidoc:217 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line217 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/MappingPage.cs#L70-L79. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse = client.Indices.GetMapping(m => m.Index("my-index")); ----- diff --git a/examples/Root/MappingPage/71ba9033107882f61cdc3b32fc73568d.asciidoc b/examples/Root/MappingPage/71ba9033107882f61cdc3b32fc73568d.asciidoc deleted file mode 100644 index fe1a6e8b384..00000000000 --- a/examples/Root/MappingPage/71ba9033107882f61cdc3b32fc73568d.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping.asciidoc:176 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line176 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/MappingPage.cs#L43-L68. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var mapResponse = client.Map(m => m - .Index("my-index") - .Properties(props => props - .Keyword(k => k - .Name(p => p.EmployeeId) - .Index(false) - ) - ) -); ----- diff --git a/examples/Root/MappingPage/99a52be903945b17e734a1d02a57e958.asciidoc b/examples/Root/MappingPage/99a52be903945b17e734a1d02a57e958.asciidoc deleted file mode 100644 index 5bcee7bdbed..00000000000 --- a/examples/Root/MappingPage/99a52be903945b17e734a1d02a57e958.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// mapping.asciidoc:263 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line263 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/MappingPage.cs#L81-L93. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var getMappingResponse = client.Indices.GetFieldMapping( - Field(p => p.EmployeeId), - m => m.Index("my-index") -); ----- diff --git a/examples/Root/MappingPage/d8b2a88b5eca99d3691ad3cd40266736.asciidoc b/examples/Root/MappingPage/d8b2a88b5eca99d3691ad3cd40266736.asciidoc deleted file mode 100644 index 2add521a2cb..00000000000 --- a/examples/Root/MappingPage/d8b2a88b5eca99d3691ad3cd40266736.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping.asciidoc:147 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line147 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/MappingPage.cs#L15-L41. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my-index", c => c - .Map(m => m - .Properties(props => props - .Number(n => n.Name(p => p.Age).Type(NumberType.Integer)) - .Keyword(k => k.Name(p => p.Email)) - .Text(k => k.Name(p => p.Name)) - ) - ) -); ----- diff --git a/examples/Root/SearchPage/014b788c879e4aaa1020672e45e25473.asciidoc b/examples/Root/SearchPage/014b788c879e4aaa1020672e45e25473.asciidoc deleted file mode 100644 index 9e976f587df..00000000000 --- a/examples/Root/SearchPage/014b788c879e4aaa1020672e45e25473.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// search.asciidoc:72 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line72 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/SearchPage.cs#L87-L105. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var putSettingsResponse = client.Cluster.PutSettings(c => c - .Transient(t => t - .Add("cluster.routing.use_adaptive_replica_selection", false) - ) -); ----- diff --git a/examples/Root/SearchPage/189a921df2f5b1fe580937210ce9c1c2.asciidoc b/examples/Root/SearchPage/189a921df2f5b1fe580937210ce9c1c2.asciidoc deleted file mode 100644 index 10777faa0ee..00000000000 --- a/examples/Root/SearchPage/189a921df2f5b1fe580937210ce9c1c2.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// search.asciidoc:96 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line96 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/SearchPage.cs#L107-L134. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q.MatchAll()) - .Stats("group1", "group2") -); ----- diff --git a/examples/Root/SearchPage/5d32279dcd52b22d9e1178a02a3ad957.asciidoc b/examples/Root/SearchPage/5d32279dcd52b22d9e1178a02a3ad957.asciidoc deleted file mode 100644 index ded849841af..00000000000 --- a/examples/Root/SearchPage/5d32279dcd52b22d9e1178a02a3ad957.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search.asciidoc:18 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line18 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/SearchPage.cs#L15-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy", - PostDate = new DateTime(2009, 11, 15, 14, 12, 12), - Message = "trying out Elasticsearch" -}, i => i - .Index("twitter") - .Routing("kimchy") -); ----- diff --git a/examples/Root/SearchPage/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc b/examples/Root/SearchPage/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc deleted file mode 100644 index e80d216bb93..00000000000 --- a/examples/Root/SearchPage/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search.asciidoc:32 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line32 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Root/SearchPage.cs#L39-L85. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Routing("kimchy") - .Query(q => q - .Bool(b => b - .Must(mu => mu - .QueryString(qs => qs - .Query("some query string here") - ) - ) - .Filter(f => f - .Term(t => t.User, "kimchy") - ) - ) - ) -); ----- diff --git a/examples/Search/CountPage/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc b/examples/Search/CountPage/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc deleted file mode 100644 index a380fba26a9..00000000000 --- a/examples/Search/CountPage/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/count.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/CountPage.cs#L15-L27. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var countResponse = client.Count(c => c - .Index("twitter") - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/CountPage/8f0511f8a5cb176ff2afdd4311799a33.asciidoc b/examples/Search/CountPage/8f0511f8a5cb176ff2afdd4311799a33.asciidoc deleted file mode 100644 index 12700a77e8b..00000000000 --- a/examples/Search/CountPage/8f0511f8a5cb176ff2afdd4311799a33.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/count.asciidoc:99 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line99 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/CountPage.cs#L29-L68. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new Tweet -{ - User = "kimchy" -}, i => i.Id(1).Index("twitter").Refresh(Refresh.True)); - -var countResponse1 = client.Count(c => c - .Index("twitter") - .QueryOnQueryString("user:kimchy") -); - -var countResponse2 = client.Count(c => c - .Index("twitter") - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/CollapsePage/032f67ced3e7d106f8722432ebbd94d3.asciidoc b/examples/Search/Request/CollapsePage/032f67ced3e7d106f8722432ebbd94d3.asciidoc deleted file mode 100644 index 2f3ad31f90b..00000000000 --- a/examples/Search/Request/CollapsePage/032f67ced3e7d106f8722432ebbd94d3.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/collapse.asciidoc:9 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line9 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/CollapsePage.cs#L15-L58. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q - .Match(m => m - .Field(f => f.Message) - .Query("elasticsearch") - ) - ) - .Collapse(c => c - .Field(f => f.User) - ) - .Sort(so => so - .Field(f => f.Likes, SortOrder.Descending) - ) - .From(10) -); ----- diff --git a/examples/Search/Request/CollapsePage/63d36a10d9475be2e2fa73d2415e20e6.asciidoc b/examples/Search/Request/CollapsePage/63d36a10d9475be2e2fa73d2415e20e6.asciidoc deleted file mode 100644 index 563f5c84132..00000000000 --- a/examples/Search/Request/CollapsePage/63d36a10d9475be2e2fa73d2415e20e6.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -// search/request/collapse.asciidoc:43 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line43 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/CollapsePage.cs#L60-L116. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q - .Match(m => m - .Field(f => f.Message) - .Query("elasticsearch") - ) - ) - .Collapse(c => c - .Field(f => f.User) - .InnerHits(ih => ih - .Name("last_tweets") - .Size(5) - .Sort(so => so - .Ascending("date") - ) - ) - .MaxConcurrentGroupSearches(4) - ) - .Sort(so => so - .Field(f => f.Likes, SortOrder.Descending) - ) -); ----- diff --git a/examples/Search/Request/DocvalueFieldsPage/097a6bc1d76c3fc92fb299001d27896e.asciidoc b/examples/Search/Request/DocvalueFieldsPage/097a6bc1d76c3fc92fb299001d27896e.asciidoc deleted file mode 100644 index 4243be04345..00000000000 --- a/examples/Search/Request/DocvalueFieldsPage/097a6bc1d76c3fc92fb299001d27896e.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// search/request/docvalue-fields.asciidoc:8 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line8 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/DocvalueFieldsPage.cs#L13-L50. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .MatchAll() - ) - .DocValueFields(d => d - .Field("my_ip_field") - .Field("my_keyword_field") - .Field("my_date_field", format: DateFormat.epoch_millis) - ) -); ----- diff --git a/examples/Search/Request/DocvalueFieldsPage/1518ad2c540fd55f9df84bbe75c81606.asciidoc b/examples/Search/Request/DocvalueFieldsPage/1518ad2c540fd55f9df84bbe75c81606.asciidoc deleted file mode 100644 index e1b37943582..00000000000 --- a/examples/Search/Request/DocvalueFieldsPage/1518ad2c540fd55f9df84bbe75c81606.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/docvalue-fields.asciidoc:36 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line36 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/DocvalueFieldsPage.cs#L52-L80. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .MatchAll() - ) - .DocValueFields(d => d - .Field("*_date_field", format: DateFormat.epoch_millis) - ) -); ----- diff --git a/examples/Search/Request/ExplainPage/e405e90fe3207157d3c0f9c76c6778e8.asciidoc b/examples/Search/Request/ExplainPage/e405e90fe3207157d3c0f9c76c6778e8.asciidoc deleted file mode 100644 index 8401660ea65..00000000000 --- a/examples/Search/Request/ExplainPage/e405e90fe3207157d3c0f9c76c6778e8.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/explain.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ExplainPage.cs#L13-L34. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Explain() - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/05ce63b83a89fddb63fd60c923811582.asciidoc b/examples/Search/Request/HighlightingPage/05ce63b83a89fddb63fd60c923811582.asciidoc deleted file mode 100644 index 7c37417a245..00000000000 --- a/examples/Search/Request/HighlightingPage/05ce63b83a89fddb63fd60c923811582.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/highlighting.asciidoc:442 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line442 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L277-L311. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .TagsSchema(HighlighterTagsSchema.Styled) - .Fields(f => f - .Field("comment") - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/05e1088d2c04391203cc8eb3ab287b71.asciidoc b/examples/Search/Request/HighlightingPage/05e1088d2c04391203cc8eb3ab287b71.asciidoc deleted file mode 100644 index d2ddd017ab2..00000000000 --- a/examples/Search/Request/HighlightingPage/05e1088d2c04391203cc8eb3ab287b71.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/highlighting.asciidoc:24 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line24 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L15-L48. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("content") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field("content") - ) - ) - -); ----- diff --git a/examples/Search/Request/HighlightingPage/146bfeeaa2ac4fc1352bf8d41097baa0.asciidoc b/examples/Search/Request/HighlightingPage/146bfeeaa2ac4fc1352bf8d41097baa0.asciidoc deleted file mode 100644 index 2f6f9354a9f..00000000000 --- a/examples/Search/Request/HighlightingPage/146bfeeaa2ac4fc1352bf8d41097baa0.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// search/request/highlighting.asciidoc:812 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line812 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L765-L807. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q - .MatchPhrase(mp => mp - .Field(f => f.Message) - .Query("number 1") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field(f => f.Message) - .Type(HighlighterType.Plain) - .FragmentSize(15) - .NumberOfFragments(3) - .Fragmenter(HighlighterFragmenter.Simple) - ) - - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/17a1e308761afd3282f13d44d7be008a.asciidoc b/examples/Search/Request/HighlightingPage/17a1e308761afd3282f13d44d7be008a.asciidoc deleted file mode 100644 index c44728612b5..00000000000 --- a/examples/Search/Request/HighlightingPage/17a1e308761afd3282f13d44d7be008a.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/highlighting.asciidoc:790 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line790 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L735-L763. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("example", c => c - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("comment") - .TermVector(TermVectorOption.WithPositionsOffsets) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/1e8b687c757981af3a9f005cfd2b4946.asciidoc b/examples/Search/Request/HighlightingPage/1e8b687c757981af3a9f005cfd2b4946.asciidoc deleted file mode 100644 index 204a0733e4a..00000000000 --- a/examples/Search/Request/HighlightingPage/1e8b687c757981af3a9f005cfd2b4946.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// search/request/highlighting.asciidoc:490 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line490 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L348-L384. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .RequireFieldMatch(false) - .Fields(f => f - .Field("body") - .PreTags("") - .PostTags("") - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/3cc4e8b1e2aecac644ba52d34ca29422.asciidoc b/examples/Search/Request/HighlightingPage/3cc4e8b1e2aecac644ba52d34ca29422.asciidoc deleted file mode 100644 index e0ebb83d9f4..00000000000 --- a/examples/Search/Request/HighlightingPage/3cc4e8b1e2aecac644ba52d34ca29422.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -// search/request/highlighting.asciidoc:279 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line279 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L50-L99. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .NumberOfFragments(3) - .FragmentSize(150) - .Fields(hf => hf - .Field("body") - .PreTags("") - .PostTags(""), hf => hf - .Field("blog.title") - .NumberOfFragments(0), hf => hf - .Field("blog.author") - .NumberOfFragments(0), hf => hf - .Field("blog.comment") - .NumberOfFragments(5) - .Order(HighlighterOrder.Score) - ) - ) - -); ----- diff --git a/examples/Search/Request/HighlightingPage/3d10eba5cac0069486bc3c2854d15689.asciidoc b/examples/Search/Request/HighlightingPage/3d10eba5cac0069486bc3c2854d15689.asciidoc deleted file mode 100644 index ade52c88af2..00000000000 --- a/examples/Search/Request/HighlightingPage/3d10eba5cac0069486bc3c2854d15689.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// search/request/highlighting.asciidoc:745 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line745 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L664-L703. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(mp => mp - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field("comment") - .FragmentSize(150) - .NumberOfFragments(3) - .NoMatchSize(150) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/4971d093f19f85e3c622f1e0257ff60f.asciidoc b/examples/Search/Request/HighlightingPage/4971d093f19f85e3c622f1e0257ff60f.asciidoc deleted file mode 100644 index e9e820e9203..00000000000 --- a/examples/Search/Request/HighlightingPage/4971d093f19f85e3c622f1e0257ff60f.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// search/request/highlighting.asciidoc:579 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line579 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L480-L524. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("running scissors") - .Fields(new[] { "comment", "comment.plain^10" }) - ) - ) - .Highlight(h => h - .Order(HighlighterOrder.Score) - .Fields(hf => hf - .Field("comment") - .MatchedFields(mf => mf - .Field("comment.plain") - ) - .Type(HighlighterType.Fvh) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/4ae1e4f88af2f9be50696e5a59466bb6.asciidoc b/examples/Search/Request/HighlightingPage/4ae1e4f88af2f9be50696e5a59466bb6.asciidoc deleted file mode 100644 index ccac0d926f8..00000000000 --- a/examples/Search/Request/HighlightingPage/4ae1e4f88af2f9be50696e5a59466bb6.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// search/request/highlighting.asciidoc:696 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line696 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L589-L625. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(mp => mp - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Order(HighlighterOrder.Score) - .Fields(hf => hf - .Field("comment") - .FragmentSize(150) - .NumberOfFragments(3) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/5ea9da129ca70a5fe534f27a82d80b29.asciidoc b/examples/Search/Request/HighlightingPage/5ea9da129ca70a5fe534f27a82d80b29.asciidoc deleted file mode 100644 index 98a721abaa5..00000000000 --- a/examples/Search/Request/HighlightingPage/5ea9da129ca70a5fe534f27a82d80b29.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/highlighting.asciidoc:772 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line772 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L705-L733. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("example", c => c - .Map(m => m - .Properties(p => p - .Text(t => t - .Name("comment") - .IndexOptions(IndexOptions.Offsets) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/62b15eac8c6d294da9114541fdfc527f.asciidoc b/examples/Search/Request/HighlightingPage/62b15eac8c6d294da9114541fdfc527f.asciidoc deleted file mode 100644 index d11fd9edc17..00000000000 --- a/examples/Search/Request/HighlightingPage/62b15eac8c6d294da9114541fdfc527f.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/highlighting.asciidoc:719 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line719 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L627-L662. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(mp => mp - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field("body"), hf => hf - .Field("blog.title") - .NumberOfFragments(0) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/87b697eb7340e9e52ca790922eca0066.asciidoc b/examples/Search/Request/HighlightingPage/87b697eb7340e9e52ca790922eca0066.asciidoc deleted file mode 100644 index 9e613eb98bb..00000000000 --- a/examples/Search/Request/HighlightingPage/87b697eb7340e9e52ca790922eca0066.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/highlighting.asciidoc:466 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line466 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L313-L346. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(f => f - .Field("comment") - .ForceSource() - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/974bb1452f614f9a378a695fa9addd4e.asciidoc b/examples/Search/Request/HighlightingPage/974bb1452f614f9a378a695fa9addd4e.asciidoc deleted file mode 100644 index 5342582ac51..00000000000 --- a/examples/Search/Request/HighlightingPage/974bb1452f614f9a378a695fa9addd4e.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -// search/request/highlighting.asciidoc:552 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line552 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L433-L478. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("running scissors") - .Fields(new[] { "comment", "comment.plain^10" }) - ) - ) - .Highlight(h => h - .Order(HighlighterOrder.Score) - .Fields(f => f - .Field("comment") - .MatchedFields(mf => mf - .Field("comment") - .Field("comment.plain") - ) - .Type(HighlighterType.Fvh) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/9e502038aa4ebb9cb4df230c0c4a854e.asciidoc b/examples/Search/Request/HighlightingPage/9e502038aa4ebb9cb4df230c0c4a854e.asciidoc deleted file mode 100644 index 85dbb4c0d1e..00000000000 --- a/examples/Search/Request/HighlightingPage/9e502038aa4ebb9cb4df230c0c4a854e.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/highlighting.asciidoc:377 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line377 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L166-L199. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(f => f - .Field("comment") - .Type(HighlighterType.Plain) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/a182c91923ad1e47cf502ea890c53015.asciidoc b/examples/Search/Request/HighlightingPage/a182c91923ad1e47cf502ea890c53015.asciidoc deleted file mode 100644 index d8d71168105..00000000000 --- a/examples/Search/Request/HighlightingPage/a182c91923ad1e47cf502ea890c53015.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -// search/request/highlighting.asciidoc:523 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line523 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L386-L431. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .QueryString(qs => qs - .Query("comment.plain:running scissors") - .Fields("comment") - ) - ) - .Highlight(h => h - .Order(HighlighterOrder.Score) - .Fields(f => f - .Field("comment") - .MatchedFields(mf => mf - .Field("comment") - .Field("comment.plain") - ) - .Type(HighlighterType.Fvh) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/a225bb439c204b20ed52a28e1dcd663b.asciidoc b/examples/Search/Request/HighlightingPage/a225bb439c204b20ed52a28e1dcd663b.asciidoc deleted file mode 100644 index dcbd35b5718..00000000000 --- a/examples/Search/Request/HighlightingPage/a225bb439c204b20ed52a28e1dcd663b.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/highlighting.asciidoc:422 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line422 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L239-L275. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .PreTags("", "") - .PostTags("", "") - .Fields(f => f - .Field("body") - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/bc9bd39420f810edae72b9fb33a154fd.asciidoc b/examples/Search/Request/HighlightingPage/bc9bd39420f810edae72b9fb33a154fd.asciidoc deleted file mode 100644 index c0b6811a9f3..00000000000 --- a/examples/Search/Request/HighlightingPage/bc9bd39420f810edae72b9fb33a154fd.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// search/request/highlighting.asciidoc:869 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line869 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L809-L851. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q - .MatchPhrase(mp => mp - .Field(f => f.Message) - .Query("number 1") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field(f => f.Message) - .Type(HighlighterType.Plain) - .FragmentSize(15) - .NumberOfFragments(3) - .Fragmenter(HighlighterFragmenter.Span) - ) - - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/e8446172481fb6298c04b4bdc3340f3f.asciidoc b/examples/Search/Request/HighlightingPage/e8446172481fb6298c04b4bdc3340f3f.asciidoc deleted file mode 100644 index 4ad9bea8063..00000000000 --- a/examples/Search/Request/HighlightingPage/e8446172481fb6298c04b4bdc3340f3f.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/highlighting.asciidoc:677 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line677 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L553-L587. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .Fields(hf => hf - .Field("comment") - .FragmentSize(150) - .NumberOfFragments(3) - ) - ) -); ----- diff --git a/examples/Search/Request/HighlightingPage/ee079a3f9eb529aac33f09be16747aa9.asciidoc b/examples/Search/Request/HighlightingPage/ee079a3f9eb529aac33f09be16747aa9.asciidoc deleted file mode 100644 index 7aa8d651d0d..00000000000 --- a/examples/Search/Request/HighlightingPage/ee079a3f9eb529aac33f09be16747aa9.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/highlighting.asciidoc:401 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line401 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/HighlightingPage.cs#L201-L237. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Match(m => m - .Field("user") - .Query("kimchy") - ) - ) - .Highlight(h => h - .PreTags("") - .PostTags("") - .Fields(f => f - .Field("body") - ) - ) -); ----- diff --git a/examples/Search/Request/IndexBoostPage/69dce2801f824f61e4f3ea9ee9371e31.asciidoc b/examples/Search/Request/IndexBoostPage/69dce2801f824f61e4f3ea9ee9371e31.asciidoc deleted file mode 100644 index 5c6225683f7..00000000000 --- a/examples/Search/Request/IndexBoostPage/69dce2801f824f61e4f3ea9ee9371e31.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/index-boost.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/IndexBoostPage.cs#L13-L34. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .IndicesBoost(ib => ib - .Add("index1", 1.4) - .Add("index2", 1.3) - ) -); ----- diff --git a/examples/Search/Request/MinScorePage/8e8ceac8fc99348f885f85ff714557fd.asciidoc b/examples/Search/Request/MinScorePage/8e8ceac8fc99348f885f85ff714557fd.asciidoc deleted file mode 100644 index c013adf6d9f..00000000000 --- a/examples/Search/Request/MinScorePage/8e8ceac8fc99348f885f85ff714557fd.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/min-score.asciidoc:8 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line8 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/MinScorePage.cs#L13-L34. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .MinScore(0.5) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/NamedQueriesAndFiltersPage/0aad4321e968effc6e6ef2b98c6c71a5.asciidoc b/examples/Search/Request/NamedQueriesAndFiltersPage/0aad4321e968effc6e6ef2b98c6c71a5.asciidoc deleted file mode 100644 index b7639dbd53a..00000000000 --- a/examples/Search/Request/NamedQueriesAndFiltersPage/0aad4321e968effc6e6ef2b98c6c71a5.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -// search/request/named-queries-and-filters.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/NamedQueriesAndFiltersPage.cs#L13-L63. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Bool(b => b - .Should(sh => sh - .Match(m => m - .Field("name.first") - .Query("shay") - .Name("first") - ), sh => sh - .Match(m => m - .Field("name.last") - .Query("banon") - .Name("last") - ) - ) - .Filter(f => f - .Terms(t => t - .Field("name.last") - .Terms("banon", "kimchy") - .Name("test") - ) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/ScrollPage/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc b/examples/Search/Request/ScrollPage/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc deleted file mode 100644 index 9a0d954292b..00000000000 --- a/examples/Search/Request/ScrollPage/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -// search/request/scroll.asciidoc:206 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line206 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L192-L259. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse1 = client.Search(s => s - .Index("twitter") - .Scroll("1m") - .Slice(sl => sl - .Id(0) - .Max(2) - ) - .Query(q => q - .Match(m => m - .Field(f => f.Title) - .Query("elasticsearch") - ) - ) -); - -var searchResponse2 = client.Search(s => s - .Index("twitter") - .Scroll("1m") - .Slice(sl => sl - .Id(1) - .Max(2) - ) - .Query(q => q - .Match(m => m - .Field(f => f.Title) - .Query("elasticsearch") - ) - ) -); ----- diff --git a/examples/Search/Request/ScrollPage/3a700f836d8d5da1b656a876554028aa.asciidoc b/examples/Search/Request/ScrollPage/3a700f836d8d5da1b656a876554028aa.asciidoc deleted file mode 100644 index f537b13c021..00000000000 --- a/examples/Search/Request/ScrollPage/3a700f836d8d5da1b656a876554028aa.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// search/request/scroll.asciidoc:172 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line172 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L130-L149. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var clearScrollResponse = client.ClearScroll(c => c - .ScrollId( - "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB") -); ----- diff --git a/examples/Search/Request/ScrollPage/72beebe779a258c225dee7b023e60c52.asciidoc b/examples/Search/Request/ScrollPage/72beebe779a258c225dee7b023e60c52.asciidoc deleted file mode 100644 index 743e70ffe6a..00000000000 --- a/examples/Search/Request/ScrollPage/72beebe779a258c225dee7b023e60c52.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/request/scroll.asciidoc:148 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line148 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L96-L108. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var nodesStatsResponse = client.Nodes.Stats(s => s - .Metric(NodesStatsMetric.Indices) - .IndexMetric(NodesStatsIndexMetric.Search) -); ----- diff --git a/examples/Search/Request/ScrollPage/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc b/examples/Search/Request/ScrollPage/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc deleted file mode 100644 index 59d7ec48553..00000000000 --- a/examples/Search/Request/ScrollPage/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -// search/request/scroll.asciidoc:45 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line45 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L16-L46. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Size(100) - .Scroll("1m") - .Query(q => q - .Match(m => m - .Field(f => f.Title) - .Query("elasticsearch") - ) - ) -); ----- diff --git a/examples/Search/Request/ScrollPage/b0d64d0a554549e5b2808002a0725493.asciidoc b/examples/Search/Request/ScrollPage/b0d64d0a554549e5b2808002a0725493.asciidoc deleted file mode 100644 index 7c74ed1dcd9..00000000000 --- a/examples/Search/Request/ScrollPage/b0d64d0a554549e5b2808002a0725493.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/scroll.asciidoc:161 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line161 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L110-L128. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var clearScrollResponse = client.ClearScroll(c => c - .ScrollId("DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==") -); ----- diff --git a/examples/Search/Request/ScrollPage/b41dce56b0e640d32b1cf452f87cec17.asciidoc b/examples/Search/Request/ScrollPage/b41dce56b0e640d32b1cf452f87cec17.asciidoc deleted file mode 100644 index 86c4817025a..00000000000 --- a/examples/Search/Request/ScrollPage/b41dce56b0e640d32b1cf452f87cec17.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/scroll.asciidoc:63 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line63 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L48-L63. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Scroll( - "1m", - "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="); ----- diff --git a/examples/Search/Request/ScrollPage/b94cee0f74f57742b3948f9b784dfdd4.asciidoc b/examples/Search/Request/ScrollPage/b94cee0f74f57742b3948f9b784dfdd4.asciidoc deleted file mode 100644 index 36d0fce2f4c..00000000000 --- a/examples/Search/Request/ScrollPage/b94cee0f74f57742b3948f9b784dfdd4.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// search/request/scroll.asciidoc:194 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line194 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L170-L190. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var clearScrollResponse = client.ClearScroll(c => c - .ScrollId( - "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", //<1> - "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB") -); ----- -<1> The client always sends `scroll_id` in the request body diff --git a/examples/Search/Request/ScrollPage/c2c21e2824fbf6b7198ede30419da82b.asciidoc b/examples/Search/Request/ScrollPage/c2c21e2824fbf6b7198ede30419da82b.asciidoc deleted file mode 100644 index 9c7d99c3365..00000000000 --- a/examples/Search/Request/ScrollPage/c2c21e2824fbf6b7198ede30419da82b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/request/scroll.asciidoc:186 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line186 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L151-L168. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var clearScrollResponse = client.ClearScroll(c => c - .ScrollId("_all") //<1> -); ----- -<1> The client always sends `scroll_id` in the request body diff --git a/examples/Search/Request/ScrollPage/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc b/examples/Search/Request/ScrollPage/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc deleted file mode 100644 index 3c22975c9ee..00000000000 --- a/examples/Search/Request/ScrollPage/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/scroll.asciidoc:95 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line95 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L65-L94. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Scroll("1m") - .Sort(so => so - .Descending(SortSpecialField.DocumentIndexOrder) - ) -); ----- diff --git a/examples/Search/Request/ScrollPage/fdcaba9547180439ff4b6275034a5170.asciidoc b/examples/Search/Request/ScrollPage/fdcaba9547180439ff4b6275034a5170.asciidoc deleted file mode 100644 index fc4d76095b8..00000000000 --- a/examples/Search/Request/ScrollPage/fdcaba9547180439ff4b6275034a5170.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/scroll.asciidoc:268 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line268 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/ScrollPage.cs#L261-L299. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Scroll("1m") - .Slice(sl => sl - .Field(f => f.Date) - .Id(0) - .Max(10) - ) - .Query(q => q - .Match(m => m - .Field(f => f.Title) - .Query("elasticsearch") - ) - ) -); ----- diff --git a/examples/Search/Request/SearchTypePage/be0d2fbf861842eef2c98d5e5bf6e406.asciidoc b/examples/Search/Request/SearchTypePage/be0d2fbf861842eef2c98d5e5bf6e406.asciidoc deleted file mode 100644 index faa386468a9..00000000000 --- a/examples/Search/Request/SearchTypePage/be0d2fbf861842eef2c98d5e5bf6e406.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/request/search-type.asciidoc:72 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line72 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SearchTypePage.cs#L28-L40. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .SearchType(SearchType.DfsQueryThenFetch) -); ----- diff --git a/examples/Search/Request/SearchTypePage/de3c9fe00efc5647ad4b695524cbe8a0.asciidoc b/examples/Search/Request/SearchTypePage/de3c9fe00efc5647ad4b695524cbe8a0.asciidoc deleted file mode 100644 index 1b450180886..00000000000 --- a/examples/Search/Request/SearchTypePage/de3c9fe00efc5647ad4b695524cbe8a0.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/request/search-type.asciidoc:54 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line54 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SearchTypePage.cs#L14-L26. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .SearchType(SearchType.QueryThenFetch) -); ----- diff --git a/examples/Search/Request/SeqNoPage/63965d439716ed6d18d30baef09001a5.asciidoc b/examples/Search/Request/SeqNoPage/63965d439716ed6d18d30baef09001a5.asciidoc deleted file mode 100644 index 5d2bc485814..00000000000 --- a/examples/Search/Request/SeqNoPage/63965d439716ed6d18d30baef09001a5.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/seq-no.asciidoc:8 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line8 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SeqNoPage.cs#L13-L43. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .SequenceNumberPrimaryTerm() - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc b/examples/Search/Request/SortPage/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc deleted file mode 100644 index b78f933d6da..00000000000 --- a/examples/Search/Request/SortPage/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// search/request/sort.asciidoc:568 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line568 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L824-L873. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .Script(ss => ss - .Type("number") - .Script(sc => sc - .Source("doc['field_name'].value * params.factor") - .Lang("painless") - .Params(p => p - .Add("factor", 1.1) - ) - ) - .Order(SortOrder.Ascending) - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/15dad5338065baaaa7d475abe85f4c22.asciidoc b/examples/Search/Request/SortPage/15dad5338065baaaa7d475abe85f4c22.asciidoc deleted file mode 100644 index 5328b674218..00000000000 --- a/examples/Search/Request/SortPage/15dad5338065baaaa7d475abe85f4c22.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// search/request/sort.asciidoc:515 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line515 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L734-L774. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .GeoDistance(g => g - .Field("pin.location") - .Points(new GeoCoordinate(40, -70)) - .Order(SortOrder.Ascending) - .Unit(DistanceUnit.Kilometers) - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc b/examples/Search/Request/SortPage/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc deleted file mode 100644 index d78c46061f7..00000000000 --- a/examples/Search/Request/SortPage/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc +++ /dev/null @@ -1,65 +0,0 @@ -// search/request/sort.asciidoc:289 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line289 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L379-L480. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Nested(n => n - .Path("parent") - .Query(nq => nq - .LongRange(r => r - .Field("parent.age") - .GreaterThanOrEquals(21) - ) && +nq - .Nested(nn => nn - .Path("parent.child") - .Query(nnq => nnq - .Match(m => m - .Field("parent.child.name") - .Query("matt") - ) - ) - ) - ) - ) - ) - .Sort(so => so - .Field(f => f - .Field("parent.child.age") - .Mode(SortMode.Min) - .Order(SortOrder.Ascending) - .Nested(ns => ns - .Path("parent") - .Filter(nf => nf - .LongRange(tf => tf - .Field("parent.age") - .GreaterThanOrEquals(21) - ) - ) - .Nested(nns => nns - .Path("parent.child") - .Filter(nnf => nnf - .Match(m => m - .Field("parent.child.name") - .Query("matt") - ) - ) - ) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/2891aa10ee9d474780adf94d5607f2db.asciidoc b/examples/Search/Request/SortPage/2891aa10ee9d474780adf94d5607f2db.asciidoc deleted file mode 100644 index 26dff09c2f3..00000000000 --- a/examples/Search/Request/SortPage/2891aa10ee9d474780adf94d5607f2db.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/sort.asciidoc:153 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line153 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L213-L239. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index(new[] { "index_long", "index_double" }) - .Sort(so => so - .Field(f => f - .Field("field") - .NumericType(NumericType.Double) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc b/examples/Search/Request/SortPage/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc deleted file mode 100644 index 9aaf6e950f6..00000000000 --- a/examples/Search/Request/SortPage/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/sort.asciidoc:211 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line211 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L293-L319. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index(new[] { "index_long", "index_double" }) - .Sort(so => so - .Field(f => f - .Field("field") - .NumericType(NumericType.DateNanos) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/7477671958734843dd67cf0b8e6c7515.asciidoc b/examples/Search/Request/SortPage/7477671958734843dd67cf0b8e6c7515.asciidoc deleted file mode 100644 index 0e9395b4979..00000000000 --- a/examples/Search/Request/SortPage/7477671958734843dd67cf0b8e6c7515.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/sort.asciidoc:192 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line192 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L267-L291. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("index_long", c => c - .Map(m => m - .Properties(p => p - .DateNanos(n => n - .Name("field") - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc b/examples/Search/Request/SortPage/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc deleted file mode 100644 index 5ebd2b1e4de..00000000000 --- a/examples/Search/Request/SortPage/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// search/request/sort.asciidoc:539 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line539 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L776-L822. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .GeoDistance(g => g - .Field("pin.location") - .Points( - new GeoCoordinate(40, -70), - new GeoCoordinate(42, -71) - ) - .Order(SortOrder.Ascending) - .Unit(DistanceUnit.Kilometers) - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc b/examples/Search/Request/SortPage/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc deleted file mode 100644 index 1343d5d2780..00000000000 --- a/examples/Search/Request/SortPage/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// search/request/sort.asciidoc:369 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line369 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L518-L549. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .Field(f => f - .Field("price") - .UnmappedType(FieldType.Long) - ) - ) - .Query(q => q - .Term("product", "chocolate") - ) -); ----- diff --git a/examples/Search/Request/SortPage/979d25dff2d8987119410291ad47b0d1.asciidoc b/examples/Search/Request/SortPage/979d25dff2d8987119410291ad47b0d1.asciidoc deleted file mode 100644 index 51e348c4455..00000000000 --- a/examples/Search/Request/SortPage/979d25dff2d8987119410291ad47b0d1.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// search/request/sort.asciidoc:444 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line444 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L603-L648. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .GeoDistance(g => g - .Field("pin.location") - .Points(new GeoLocation(40, -70)) - .Order(SortOrder.Ascending) - .Unit(DistanceUnit.Kilometers) - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/abf329ebefaf58acd4ee30e685731499.asciidoc b/examples/Search/Request/SortPage/abf329ebefaf58acd4ee30e685731499.asciidoc deleted file mode 100644 index e01531c2cf6..00000000000 --- a/examples/Search/Request/SortPage/abf329ebefaf58acd4ee30e685731499.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/sort.asciidoc:122 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line122 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L159-L184. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("index_double", c => c - .Map(m => m - .Properties(p => p - .Number(n => n - .Name("field") - .Type(NumberType.Double) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc b/examples/Search/Request/SortPage/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc deleted file mode 100644 index adaba87a066..00000000000 --- a/examples/Search/Request/SortPage/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// search/request/sort.asciidoc:30 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line30 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L59-L104. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("my_index") - .Sort(so => so - .Ascending(f => f.PostDate) - .Field(f => f.Field("user")) - .Descending(f => f.Name) - .Descending(f => f.Age) - .Field(f => f.Field("_score")) - ) - .Query(q => q - .Term(t => t - .Field(f => f.User) - .Value("kimchy") - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/b997885974522ef439d5e345924cc5ba.asciidoc b/examples/Search/Request/SortPage/b997885974522ef439d5e345924cc5ba.asciidoc deleted file mode 100644 index 6d0015c17f1..00000000000 --- a/examples/Search/Request/SortPage/b997885974522ef439d5e345924cc5ba.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -// search/request/sort.asciidoc:94 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line94 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L106-L157. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var indexResponse = client.Index(new -{ - product = "chocolate", - price = new[] { 20, 4 } -}, i => i - .Index("my_index") - .Id(1) - .Refresh(Refresh.True) -); - -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Term(t => t - .Field("product") - .Value("chocolate") - ) - ) - .Sort(so => so - .Field(f => f - .Field("price") - .Order(SortOrder.Ascending) - .Mode(SortMode.Average) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/d17269bb80fb63ec0bf37d219e003dcb.asciidoc b/examples/Search/Request/SortPage/d17269bb80fb63ec0bf37d219e003dcb.asciidoc deleted file mode 100644 index 69ffb5d23ac..00000000000 --- a/examples/Search/Request/SortPage/d17269bb80fb63ec0bf37d219e003dcb.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -// search/request/sort.asciidoc:391 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line391 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L551-L601. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .GeoDistance(g => g - .Field("pin.location") - .Points(new GeoCoordinate(40, -70)) - .Order(SortOrder.Ascending) - .Unit(DistanceUnit.Kilometers) - .Mode(SortMode.Min) - .DistanceType(GeoDistanceType.Arc) - .IgnoreUnmapped() - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc b/examples/Search/Request/SortPage/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc deleted file mode 100644 index 13c73b5c52c..00000000000 --- a/examples/Search/Request/SortPage/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -// search/request/sort.asciidoc:11 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line11 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L16-L57. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("my_index", c => c - .Map(m => m - .Properties(p => p - .Date(d => d - .Name(n => n.PostDate) - ) - .Keyword(k => k - .Name(n => n.User) - ) - .Keyword(k => k - .Name(n => n.Name) - ) - .Number(n => n - .Name(nn => nn.Age) - .Type(NumberType.Integer) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/d50a3c64890f88af32c6d4ef4899d82a.asciidoc b/examples/Search/Request/SortPage/d50a3c64890f88af32c6d4ef4899d82a.asciidoc deleted file mode 100644 index 838198a97f8..00000000000 --- a/examples/Search/Request/SortPage/d50a3c64890f88af32c6d4ef4899d82a.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -// search/request/sort.asciidoc:470 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line470 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L650-L690. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Sort(so => so - .GeoDistance(g => g - .Field("pin.location") - .Points(new GeoCoordinate(40, -70)) - .Order(SortOrder.Ascending) - .Unit(DistanceUnit.Kilometers) - ) - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/de139866a220124360e5e27d1a736ea4.asciidoc b/examples/Search/Request/SortPage/de139866a220124360e5e27d1a736ea4.asciidoc deleted file mode 100644 index 097248f36e2..00000000000 --- a/examples/Search/Request/SortPage/de139866a220124360e5e27d1a736ea4.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -// search/request/sort.asciidoc:262 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line262 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L321-L377. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Query(q => q - .Term(t => t - .Field("product") - .Value("chocolate") - ) - ) - .Sort(so => so - .Field(f => f - .Field("offer.price") - .Mode(SortMode.Average) - .Order(SortOrder.Ascending) - .Nested(ns => ns - .Path("offer") - .Filter(nf => nf - .Term(tf => tf - .Field("offer.color") - .Value("blue") - ) - ) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/e8e451bc8c45bcf16df43804c4fc8329.asciidoc b/examples/Search/Request/SortPage/e8e451bc8c45bcf16df43804c4fc8329.asciidoc deleted file mode 100644 index 583ae6d5655..00000000000 --- a/examples/Search/Request/SortPage/e8e451bc8c45bcf16df43804c4fc8329.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -// search/request/sort.asciidoc:597 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line597 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L875-L911. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .TrackScores() - .Sort(so => so - .Descending("post_date") - .Descending("name") - .Descending("age") - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/SortPage/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc b/examples/Search/Request/SortPage/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc deleted file mode 100644 index 9e27b47d7f7..00000000000 --- a/examples/Search/Request/SortPage/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/request/sort.asciidoc:345 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line345 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L482-L516. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var response0 = client.Search(s => s - .AllIndices() - .Sort(so => so - .Field(f => f - .Field("price") - .MissingLast() - ) - ) - .Query(q => q - .Term(t => t - .Field("product") - .Value("chocolate") - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc b/examples/Search/Request/SortPage/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc deleted file mode 100644 index 38c17c12e52..00000000000 --- a/examples/Search/Request/SortPage/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/sort.asciidoc:180 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line180 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L241-L265. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("index_double", c => c - .Map(m => m - .Properties(p => p - .Date(n => n - .Name("field") - ) - ) - ) -); ----- diff --git a/examples/Search/Request/SortPage/f6b5032bf27c2445d28845be0d413970.asciidoc b/examples/Search/Request/SortPage/f6b5032bf27c2445d28845be0d413970.asciidoc deleted file mode 100644 index 1e7e6db6f78..00000000000 --- a/examples/Search/Request/SortPage/f6b5032bf27c2445d28845be0d413970.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/sort.asciidoc:134 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line134 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/SortPage.cs#L186-L211. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var createIndexResponse = client.Indices.Create("index_long", c => c - .Map(m => m - .Properties(p => p - .Number(n => n - .Name("field") - .Type(NumberType.Long) - ) - ) - ) -); ----- diff --git a/examples/Search/Request/StoredFieldsPage/2af86a6ebbb834fbcf6fa7268f87a3a5.asciidoc b/examples/Search/Request/StoredFieldsPage/2af86a6ebbb834fbcf6fa7268f87a3a5.asciidoc deleted file mode 100644 index fb29859272c..00000000000 --- a/examples/Search/Request/StoredFieldsPage/2af86a6ebbb834fbcf6fa7268f87a3a5.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/stored-fields.asciidoc:29 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line29 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/StoredFieldsPage.cs#L39-L60. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .StoredFields(sf => sf) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/StoredFieldsPage/2eeb3e55a7d3955e084bb369f1539009.asciidoc b/examples/Search/Request/StoredFieldsPage/2eeb3e55a7d3955e084bb369f1539009.asciidoc deleted file mode 100644 index cc7ac620433..00000000000 --- a/examples/Search/Request/StoredFieldsPage/2eeb3e55a7d3955e084bb369f1539009.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// search/request/stored-fields.asciidoc:13 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line13 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/StoredFieldsPage.cs#L14-L37. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .StoredFields(sf => sf - .Fields("user", "postDate") - ) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/StoredFieldsPage/ccec437aed7a10d9111724ffd929fe00.asciidoc b/examples/Search/Request/StoredFieldsPage/ccec437aed7a10d9111724ffd929fe00.asciidoc deleted file mode 100644 index 2b33193b3a3..00000000000 --- a/examples/Search/Request/StoredFieldsPage/ccec437aed7a10d9111724ffd929fe00.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/stored-fields.asciidoc:55 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line55 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/StoredFieldsPage.cs#L62-L87. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .StoredFields(sf => sf.Field("_none_")) - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/Request/TrackTotalHitsPage/32789ba30a73d8813b61c39619ad7d71.asciidoc b/examples/Search/Request/TrackTotalHitsPage/32789ba30a73d8813b61c39619ad7d71.asciidoc deleted file mode 100644 index de8f947567f..00000000000 --- a/examples/Search/Request/TrackTotalHitsPage/32789ba30a73d8813b61c39619ad7d71.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/track-total-hits.asciidoc:23 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line23 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/TrackTotalHitsPage.cs#L13-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .TrackTotalHits() - .Query(q => q - .Match(m => m - .Field("message") - .Query("Elasticsearch") - ) - ) -); ----- diff --git a/examples/Search/Request/TrackTotalHitsPage/d9e08bca979c7ba3a9581f69470bf914.asciidoc b/examples/Search/Request/TrackTotalHitsPage/d9e08bca979c7ba3a9581f69470bf914.asciidoc deleted file mode 100644 index 2c09c5445aa..00000000000 --- a/examples/Search/Request/TrackTotalHitsPage/d9e08bca979c7ba3a9581f69470bf914.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -// search/request/track-total-hits.asciidoc:142 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line142 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/TrackTotalHitsPage.cs#L68-L94. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .TrackTotalHits(false) - .Query(q => q - .Match(m => m - .Field("message") - .Query("Elasticsearch") - ) - ) -); ----- diff --git a/examples/Search/Request/VersionPage/9535be36eac8a589bd6bf7b7228eefd7.asciidoc b/examples/Search/Request/VersionPage/9535be36eac8a589bd6bf7b7228eefd7.asciidoc deleted file mode 100644 index f40bd2f8fbe..00000000000 --- a/examples/Search/Request/VersionPage/9535be36eac8a589bd6bf7b7228eefd7.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/version.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/Request/VersionPage.cs#L13-L34. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Version() - .Query(q => q - .Term("user", "kimchy") - ) -); ----- diff --git a/examples/Search/RequestBodyPage/0ce3606f1dba490eef83c4317b315b62.asciidoc b/examples/Search/RequestBodyPage/0ce3606f1dba490eef83c4317b315b62.asciidoc deleted file mode 100644 index 4be5151cf64..00000000000 --- a/examples/Search/RequestBodyPage/0ce3606f1dba490eef83c4317b315b62.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/request-body.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/RequestBodyPage.cs#L15-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q.Term(p => p.User, "kimchy")) -); ----- diff --git a/examples/Search/RequestBodyPage/bfcd65ab85d684d36a8550080032958d.asciidoc b/examples/Search/RequestBodyPage/bfcd65ab85d684d36a8550080032958d.asciidoc deleted file mode 100644 index 2f70608e6b1..00000000000 --- a/examples/Search/RequestBodyPage/bfcd65ab85d684d36a8550080032958d.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// search/request-body.asciidoc:65 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line65 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/RequestBodyPage.cs#L41-L61. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Size(0) - .TerminateAfter(1) - .QueryOnQueryString("message:number") -); ----- diff --git a/examples/Search/SearchPage/168bfdde773570cfc6dd3ab3574e413b.asciidoc b/examples/Search/SearchPage/168bfdde773570cfc6dd3ab3574e413b.asciidoc deleted file mode 100644 index b7967c4ecc2..00000000000 --- a/examples/Search/SearchPage/168bfdde773570cfc6dd3ab3574e413b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/search.asciidoc:654 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line654 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L55-L67. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/SearchPage/43682666e1abcb14770c99f02eb26a0d.asciidoc b/examples/Search/SearchPage/43682666e1abcb14770c99f02eb26a0d.asciidoc deleted file mode 100644 index 95593385a9b..00000000000 --- a/examples/Search/SearchPage/43682666e1abcb14770c99f02eb26a0d.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/search.asciidoc:669 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line669 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L83-L98. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/SearchPage/8022e6a690344035b6472a43a9d122e0.asciidoc b/examples/Search/SearchPage/8022e6a690344035b6472a43a9d122e0.asciidoc deleted file mode 100644 index e3c84a4e760..00000000000 --- a/examples/Search/SearchPage/8022e6a690344035b6472a43a9d122e0.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/search.asciidoc:663 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line663 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L69-L81. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/SearchPage/be49260e1b3496c4feac38c56ebb0669.asciidoc b/examples/Search/SearchPage/be49260e1b3496c4feac38c56ebb0669.asciidoc deleted file mode 100644 index e8bc2296466..00000000000 --- a/examples/Search/SearchPage/be49260e1b3496c4feac38c56ebb0669.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/search.asciidoc:596 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line596 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L27-L39. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/SearchPage/d2153f3100bf12c2de98f14eb86ab061.asciidoc b/examples/Search/SearchPage/d2153f3100bf12c2de98f14eb86ab061.asciidoc deleted file mode 100644 index 8cdcc9ae8a6..00000000000 --- a/examples/Search/SearchPage/d2153f3100bf12c2de98f14eb86ab061.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/search.asciidoc:10 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line10 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L14-L25. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") -); ----- diff --git a/examples/Search/SearchPage/f5569945024b9d664828693705c27c1a.asciidoc b/examples/Search/SearchPage/f5569945024b9d664828693705c27c1a.asciidoc deleted file mode 100644 index fa43145f403..00000000000 --- a/examples/Search/SearchPage/f5569945024b9d664828693705c27c1a.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// search/search.asciidoc:642 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line642 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SearchPage.cs#L41-L53. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index(new[] { "kimchy", "elasticsearch" }) - .QueryOnQueryString("user:kimchy") -); ----- diff --git a/examples/Search/SuggestersPage/2533e4b36ae837eaecda08407ecb6383.asciidoc b/examples/Search/SuggestersPage/2533e4b36ae837eaecda08407ecb6383.asciidoc deleted file mode 100644 index e6b54a6bd8a..00000000000 --- a/examples/Search/SuggestersPage/2533e4b36ae837eaecda08407ecb6383.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// search/suggesters.asciidoc:51 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line51 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SuggestersPage.cs#L55-L92. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Suggest(su => su - .Term("my-suggest-1", t => t - .Text("tring out Elasticsearch") - .Field(f => f.Message) - ) - .Term("my-suggest-2", t => t - .Text("kmichy") - .Field(f => f.User) - ) - ) -); ----- diff --git a/examples/Search/SuggestersPage/5275842787967b6db876025f4a1c6942.asciidoc b/examples/Search/SuggestersPage/5275842787967b6db876025f4a1c6942.asciidoc deleted file mode 100644 index eabd3971e5c..00000000000 --- a/examples/Search/SuggestersPage/5275842787967b6db876025f4a1c6942.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// search/suggesters.asciidoc:127 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line127 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SuggestersPage.cs#L94-L136. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .AllIndices() - .Suggest(su => su - .Term("my-suggest-1", t => t - .Text("tring out Elasticsearch") - .Field(f => f.Message) - ) - .Term("my-suggest-2", t => t - .Text("tring out Elasticsearch") - .Field(f => f.User) - ) - ) -); ----- diff --git a/examples/Search/SuggestersPage/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc b/examples/Search/SuggestersPage/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc deleted file mode 100644 index 51183bb6799..00000000000 --- a/examples/Search/SuggestersPage/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -// search/suggesters.asciidoc:8 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line8 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Search/SuggestersPage.cs#L15-L53. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var searchResponse = client.Search(s => s - .Index("twitter") - .Query(q => q - .Match(m => m - .Field(f => f.Message) - .Query("tring out Elasticsearch") - ) - ) - .Suggest(su => su - .Term("my-suggestion", t => t - .Text("tring out Elasticsearch") - .Field(f => f.Message) - ) - ) -); ----- diff --git a/examples/Setup/Install/CheckRunningPage/3d1ff6097e2359f927c88c2ccdb36252.asciidoc b/examples/Setup/Install/CheckRunningPage/3d1ff6097e2359f927c88c2ccdb36252.asciidoc deleted file mode 100644 index c5f994993a3..00000000000 --- a/examples/Setup/Install/CheckRunningPage/3d1ff6097e2359f927c88c2ccdb36252.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// setup/install/check-running.asciidoc:7 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line7 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Setup/Install/CheckRunningPage.cs#L12-L21. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var nodeInfoResponse = client.RootNodeInfo(); ----- diff --git a/examples/Setup/LoggingConfigPage/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc b/examples/Setup/LoggingConfigPage/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc deleted file mode 100644 index 42fdada2d02..00000000000 --- a/examples/Setup/LoggingConfigPage/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// setup/logging-config.asciidoc:155 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line155 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Setup/LoggingConfigPage.cs#L13-L31. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var settingsResponse = client.Cluster.PutSettings(s => s - .Transient(t => t - .Add("logger.org.elasticsearch.transport", "trace") - ) -); ----- diff --git a/examples/Upgrade/RollingUpgradePage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc b/examples/Upgrade/RollingUpgradePage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc deleted file mode 100644 index bf890c7564f..00000000000 --- a/examples/Upgrade/RollingUpgradePage/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// upgrade/rolling_upgrade.asciidoc:194 - -//// -IMPORTANT NOTE -============== -This file is generated from method Line194 in https://github.com/elastic/elasticsearch-net/tree/master/tests/Examples/Upgrade/RollingUpgradePage.cs#L100-L109. -If you wish to submit a PR to change this example, please change the source method above and run - -dotnet run -- asciidoc - -from the ExamplesGenerator project directory, and submit a PR for the change at -https://github.com/elastic/elasticsearch-net/pulls -//// - -[source, csharp] ----- -var catResponse = client.Cat.Health(h => h.Verbose()); ----- diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs index 5b3f65dd062..cb06c1a3f70 100644 --- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs +++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-Manual.cs @@ -23,6 +23,24 @@ public virtual Task> UpdateAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); } + // TODO: Test and introduce in a future release + //public virtual Task> UpdateAsync(IndexName index, Id id, Action> configureRequest, CancellationToken cancellationToken = default) + //{ + // var descriptor = new UpdateRequestDescriptor(index, id); + // configureRequest?.Invoke(descriptor); + // return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); + //} + + // TODO: Test and introduce in a future release + //public virtual Task> UpdateAsync(IndexName index, Id id, TPartialDocument doc, CancellationToken cancellationToken = default) + //{ + // var descriptor = new UpdateRequestDescriptor(index, id); + // descriptor.Doc(doc); + // return DoRequestAsync, UpdateResponse, UpdateRequestParameters>(descriptor, cancellationToken); + //} + + // TODO - Add methods to infer index and/or ID + use expressions as we know the document type. + public virtual UpdateResponse Update(IndexName index, Id id) { var descriptor = new UpdateRequestDescriptor(index, id); diff --git a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs index ab37d95281e..025c4e980c2 100644 --- a/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs +++ b/tests/Tests/Documentation/ClientConcepts/Serialization/CustomSerializationTests.cs @@ -56,21 +56,21 @@ public async Task CustomizingJsonSerializerOptions() { // This example resets the PropertyNamingPolicy, such that the existing C# Pascal case is sent in the JSON. - #pragma warning disable format - //tag::custom-options-local-function[] - static void ConfigureOptions(JsonSerializerOptions o) => // <1> - o.PropertyNamingPolicy = null; - //end::custom-options-local-function[] - - //tag::create-client[] - var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); - var settings = new ElasticsearchClientSettings( - nodePool, - sourceSerializer: (defaultSerializer, settings) => - new DefaultSourceSerializer(settings, ConfigureOptions)); // <2> - var client = new ElasticsearchClient(settings); - //end::create-client[] - #pragma warning restore format +#pragma warning disable format +//tag::custom-options-local-function[] +static void ConfigureOptions(JsonSerializerOptions o) => // <1> + o.PropertyNamingPolicy = null; +//end::custom-options-local-function[] + +//tag::create-client[] +var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); +var settings = new ElasticsearchClientSettings( + nodePool, + sourceSerializer: (defaultSerializer, settings) => + new DefaultSourceSerializer(settings, ConfigureOptions)); // <2> +var client = new ElasticsearchClient(settings); +//end::create-client[] +#pragma warning restore format // Needed for the test assertion as we should use the in memory connection and disable direct streaming. // We don't want to include those in the docs as it may mislead or confuse developers. @@ -83,12 +83,12 @@ static void ConfigureOptions(JsonSerializerOptions o) => // <1> .DisableDirectStreaming(); client = new ElasticsearchClient(settings); - #pragma warning disable format - //tag::index-person[] - var person = new Person { FirstName = "Steve" }; - var indexResponse = await client.IndexAsync(person, "my-index-name"); - //end::index-person[] - #pragma warning restore format +#pragma warning disable format +//tag::index-person[] +var person = new Person { FirstName = "Steve" }; +var indexResponse = await client.IndexAsync(person, "my-index-name"); +//end::index-person[] +#pragma warning restore format var requestJson = Encoding.UTF8.GetString(indexResponse.ApiCallDetails.RequestBodyInBytes); await Verifier.Verify(requestJson); diff --git a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs new file mode 100644 index 00000000000..5b6f5398d52 --- /dev/null +++ b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs @@ -0,0 +1,216 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +// ********************************** +// IMPORTANT: These tests have a secondary use as code snippets used in documentation. +// We disable formatting in sections of this file to ensure the correct indentation when tagged regions are +// included in the asciidocs. While hard to read, this formatting should be left as-is for docs generation. +// We also include using directives that are not required due to global using directives, but remain here +// so that can appear in the documentation. +// ********************************** + +#pragma warning disable CS0105 // Using directive appeared previously in this namespace +#pragma warning disable IDE0005 // Remove unnecessary using directives +//tag::using-directives[] +using System; +using Elastic.Clients.Elasticsearch; +using Elastic.Clients.Elasticsearch.QueryDsl; +//end::using-directives[] +using System.Text; +using System.Threading.Tasks; +using System.Linq; +#pragma warning restore IDE0005 // Remove unnecessary using directives +#pragma warning restore CS0105 // Using directive appeared previously in this namespace + +namespace Tests.Documentation.Usage; + +public class CrudExamplesTests +{ + [U] + public async Task IndexingADocument() + { + // We're not really testing anything here. We have the code for inclusion in the docs and this ensures it compiles. + +#pragma warning disable format +//tag::create-client[] +var client = new ElasticsearchClient(); // <1> +//end::create-client[] +#pragma warning restore format + + var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""-7W0vIYBr7okFIdMVQuD"",""_version"":1,""result"":""created"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":4,""_primary_term"":3}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + // Needed for the test assertion as we should use the in memory connection and disable direct streaming. + // We don't want to include those in the docs as it may mislead or confuse developers. + // Any changes to the documentation code needs to be applied here also. + client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 201))); + +#pragma warning disable format +//tag::create-tweet[] +var tweet = new Tweet // <1> +{ + Id = 1, + User = "stevejgordon", + PostDate = new DateTime(2009, 11, 15), + Message = "Trying out the client, so far so good?" +}; + +var response = await client.IndexAsync(tweet, "my-tweet-index"); // <2> + +if (response.IsValidResponse) // <3> +{ + Console.WriteLine($"Index document with ID {response.Id} succeeded."); // <4> +} +//end::create-tweet[] +#pragma warning restore format + + response.IsValidResponse.Should().BeTrue(); + } + + [U] + public async Task GettingADocument() + { + var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":1,""_seq_no"":0,""_primary_term"":1,""found"":true,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + +#pragma warning disable format +//tag::get-tweet[] +var response = await client.GetAsync(1, idx => idx.Index("my-tweet-index")); // <1> + +if (response.IsValidResponse) +{ + var tweet = response.Source; // <2> +} +//end::get-tweet[] +#pragma warning restore format + + var tweetSource = response.Source; + tweetSource.User.Should().Be("stevejgordon"); + } + + [U] + public async Task SearchingForDocumentsFluent() + { + var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200)).EnableDebugMode()); + +#pragma warning disable format +//tag::search-tweet-fluent[] +var response = await client.SearchAsync(s => s // <1> + .Index("my-tweet-index") // <2> + .From(0) + .Size(10) + .Query(q => q + .Term(t => t.User, "stevejgordon") // <3> + ) +); + +if (response.IsValidResponse) +{ + var tweet = response.Documents.FirstOrDefault(); // <4> +} +//end::search-tweet-fluent[] +#pragma warning restore format + + response.Hits.Count().Should().Be(1); + } + + [U] + public async Task SearchingForDocumentsObject() + { + var jsonResponse = @"{""took"":9,""timed_out"":false,""_shards"":{""total"":1,""successful"":1,""skipped"":0,""failed"":0},""hits"":{""total"":{""value"":1,""relation"":""eq""},""max_score"":0.2876821,""hits"":[{""_index"":""my-tweet-index"",""_id"":""1"",""_score"":0.2876821,""_source"":{""id"":1,""user"":""stevejgordon"",""postDate"":""2023-01-01T10:00:00"",""message"":""Test message""}}]}}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + +#pragma warning disable format +//tag::search-tweet-object-initializer[] +var request = new SearchRequest("my-tweet-index") // <1> +{ + From = 0, + Size = 10, + Query = new TermQuery("user") { Value = "stevejgordon" } +}; + +var response = await client.SearchAsync(request); // <2> + +if (response.IsValidResponse) +{ + var tweet = response.Documents.FirstOrDefault(); +} +//end::search-tweet-object-initializer[] +#pragma warning restore format + + response.Hits.Count().Should().Be(1); + } + + [U] + public async Task UpdatingADocument() + { + var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":2,""result"":""updated"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":1,""_primary_term"":1}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + + var tweet = new Tweet + { + Id = 1, + User = "stevejgordon", + PostDate = new DateTime(2009, 11, 15), + Message = "Trying out the client, so far so good?" + }; + +#pragma warning disable format +//tag::update-tweet[] +tweet.Message = "This is a new message"; // <1> + +var response = await client.UpdateAsync("my-tweet-index", 1, u => u + .Doc(tweet)); // <2> + +if (response.IsValidResponse) +{ + Console.WriteLine("Update document succeeded."); +} +//end::update-tweet[] +#pragma warning restore format + + response.IsValidResponse.Should().BeTrue(); + } + + [U] + public async Task DeletingADocument() + { + var jsonResponse = @"{""_index"":""my-tweet-index"",""_id"":""1"",""_version"":3,""result"":""deleted"",""_shards"":{""total"":2,""successful"":1,""failed"":0},""_seq_no"":2,""_primary_term"":1}"; + var responseBytes = Encoding.UTF8.GetBytes(jsonResponse); + + var client = new ElasticsearchClient(new ElasticsearchClientSettings(new InMemoryConnection(responseBytes, 200))); + +#pragma warning disable format +//tag::delete-tweet[] +var response = await client.DeleteAsync("my-tweet-index", 1); + +if (response.IsValidResponse) +{ + Console.WriteLine("Delete document succeeded."); +} +//end::delete-tweet[] +#pragma warning restore format + + response.IsValidResponse.Should().BeTrue(); + } +} + +//tag::tweet-class[] +public class Tweet +{ + public int Id { get; set; } // <1> + public string User { get; set; } + public DateTime PostDate { get; set; } + public string Message { get; set; } +} +//end::tweet-class[]