Skip to content

Commit 2a973f6

Browse files
committed
Regenerate asciidocs
1 parent 85e9a45 commit 2a973f6

File tree

23 files changed

+146
-486
lines changed

23 files changed

+146
-486
lines changed

docs/aggregations/bucket/children/children-aggregation-usage.asciidoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ s => s
3030
.Aggregations(childAggs => childAggs
3131
.Average("average_per_child", avg => avg.Field(p => p.ConfidenceFactor))
3232
.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor))
33+
.Min("min_per_child", avg => avg.Field(p => p.ConfidenceFactor))
3334
)
3435
)
3536
)
@@ -44,8 +45,9 @@ new SearchRequest<Project>
4445
Aggregations = new ChildrenAggregation("name_of_child_agg", typeof(CommitActivity))
4546
{
4647
Aggregations =
47-
new AverageAggregation("average_per_child", "confidenceFactor") &&
48-
new MaxAggregation("max_per_child", "confidenceFactor")
48+
new AverageAggregation("average_per_child", "confidenceFactor")
49+
&& new MaxAggregation("max_per_child", "confidenceFactor")
50+
&& new MinAggregation("min_per_child", "confidenceFactor")
4951
}
5052
}
5153
----
@@ -69,6 +71,11 @@ new SearchRequest<Project>
6971
"max": {
7072
"field": "confidenceFactor"
7173
}
74+
},
75+
"min_per_child": {
76+
"min": {
77+
"field": "confidenceFactor"
78+
}
7279
}
7380
}
7481
}

docs/aggregations/metric/geo-centroid/geo-centroid-aggregation-usage.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ please modify the original csharp file found at the link and submit the PR with
1515
[[geo-centroid-aggregation-usage]]
1616
== Geo Centroid Aggregation Usage
1717

18-
A metric aggregation that computes the weighted centroid from all coordinate values
18+
A metric aggregation that computes the weighted centroid from all coordinate values
1919
for a Geo-point datatype field.
2020

2121
Be sure to read the Elasticsearch documentation on {ref_current}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid Aggregation]
@@ -68,11 +68,9 @@ centroid.Location.Latitude.Should().NotBe(0);
6868
centroid.Location.Longitude.Should().NotBe(0);
6969
----
7070

71-
[[geo-centroid-sub-aggregation]]
72-
7371
[[geo-centroid-sub-aggregation]]
7472
[float]
75-
== Geo Centroid Sub Aggregation
73+
== Geo Centroid Sub Aggregation
7674

7775
The `geo_centroid` aggregation is more interesting when combined as a sub-aggregation to other bucket aggregations
7876

docs/aggregations/writing-aggregations.asciidoc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ This is the json output for each example
4747
"max": {
4848
"field": "confidenceFactor"
4949
}
50+
},
51+
"min_per_child": {
52+
"min": {
53+
"field": "confidenceFactor"
54+
}
5055
}
5156
}
5257
}
@@ -67,6 +72,7 @@ s => s
6772
.Aggregations(childAggs => childAggs
6873
.Average("average_per_child", avg => avg.Field(p => p.ConfidenceFactor))
6974
.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor))
75+
.Min("min_per_child", avg => avg.Field(p => p.ConfidenceFactor))
7076
)
7177
)
7278
)
@@ -87,6 +93,7 @@ new SearchRequest<Project>
8793
Aggregations =
8894
new AverageAggregation("average_per_child", "confidenceFactor")
8995
&& new MaxAggregation("max_per_child", "confidenceFactor")
96+
&& new MinAggregation("min_per_child", "confidenceFactor")
9097
}
9198
}
9299
----
@@ -108,6 +115,7 @@ new SearchRequest<Project>
108115
Aggregations =
109116
new AverageAggregation("average_per_child", Field<CommitActivity>(p => p.ConfidenceFactor))
110117
&& new MaxAggregation("max_per_child", Field<CommitActivity>(p => p.ConfidenceFactor))
118+
&& new MinAggregation("min_per_child", Field<CommitActivity>(p => p.ConfidenceFactor))
111119
}
112120
}
113121
----
@@ -123,7 +131,8 @@ on the request. Using LINQ's `.Aggregate()` method, each function can be applied
123131
var aggregations = new List<Func<AggregationContainerDescriptor<CommitActivity>, IAggregationContainer>> <1>
124132
{
125133
a => a.Average("average_per_child", avg => avg.Field(p => p.ConfidenceFactor)),
126-
a => a.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor))
134+
a => a.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor)),
135+
a => a.Min("min_per_child", avg => avg.Field(p => p.ConfidenceFactor))
127136
};
128137
return s => s
129138
.Aggregations(aggs => aggs
@@ -138,6 +147,25 @@ return s => s
138147

139148
<2> Using LINQ's `Aggregate()` function to accumulate/apply all of the aggregation functions
140149

150+
Combining multipe `AggregationDescriptor`'s is also possible using the bitwise `&` operator
151+
152+
=== Fluent DSL Example
153+
154+
[source,csharp]
155+
----
156+
var aggregations = new AggregationContainerDescriptor<CommitActivity>()
157+
.Average("average_per_child", avg => avg.Field(p => p.ConfidenceFactor))
158+
.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor))
159+
&& new AggregationContainerDescriptor<CommitActivity>()
160+
.Min("min_per_child", avg => avg.Field(p => p.ConfidenceFactor));
161+
return s => s
162+
.Aggregations(aggs => aggs
163+
.Children<CommitActivity>("name_of_child_agg", child => child
164+
.Aggregations(childAggs => aggregations)
165+
)
166+
);
167+
----
168+
141169
[[aggs-vs-aggregations]]
142170
=== Aggs vs. Aggregations
143171

@@ -158,6 +186,7 @@ s => s
158186
.Aggregations(childAggs => childAggs
159187
.Average("average_per_child", avg => avg.Field(p => p.ConfidenceFactor))
160188
.Max("max_per_child", avg => avg.Field(p => p.ConfidenceFactor))
189+
.Min("min_per_child", avg => avg.Field(p => p.ConfidenceFactor))
161190
)
162191
)
163192
)

docs/client-concepts/connection-pooling/failover/falling-over.asciidoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,29 @@ audit = await audit.TraceCall(
8181
);
8282
----
8383

84+
[[service-unavailable]]
85+
=== 504 Gateway Timeout
86+
87+
Will be treated as an error that requires retrying
88+
89+
[source,csharp]
90+
----
91+
var audit = new Auditor(() => Framework.Cluster
92+
.Nodes(10)
93+
.ClientCalls(r => r.FailAlways(504))
94+
.ClientCalls(r => r.OnPort(9201).SucceedAlways())
95+
.StaticConnectionPool()
96+
.Settings(s => s.DisablePing())
97+
);
98+
99+
audit = await audit.TraceCall(
100+
new ClientCall {
101+
{ BadResponse, 9200 },
102+
{ HealthyResponse, 9201 },
103+
}
104+
);
105+
----
106+
84107
If a call returns a valid http status code other than 502 or 503, the request won't be retried.
85108

86109
IMPORTANT: Different requests may have different status codes that are deemed valid. For example,

docs/client-concepts/high-level/inference/field-inference.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Expect("metadata.var").WhenSerializing(Field<Project>(p => p.Metadata[variable])
255255
Expect("metadata.var.created").WhenSerializing(Field<Project>(p => p.Metadata[variable].Created));
256256
----
257257

258-
If you are using Elasticearch's {ref_current}/_multi_fields.html[multi_fields], which you really should as they allow
258+
If you are using Elasticearch's multi fields, which you really should as they allow
259259
you to analyze a string in a number of different ways, these __"virtual"__ sub fields
260260
do not always map back on to your POCO. By calling `.Suffix()` on expressions, you describe the sub fields that
261261
should be mapped and <<auto-map, how they are mapped>>

docs/client-concepts/high-level/inference/property-inference.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ please modify the original csharp file found at the link and submit the PR with
1818
=== Appending suffixes to a Lambda expression body
1919

2020
Suffixes can be appended to the body of a lambda expression, useful in cases where
21-
you have a POCO property mapped as a {ref_current}/_multi_fields.html[multi_field]
21+
you have a POCO property mapped as a multi field
2222
and want to use strongly typed access based on the property, yet append a suffix to the
23-
generated field name in order to access a particular `multi_field`.
23+
generated field name in order to access a particular multi field.
2424

2525
The `.Suffix()` extension method can be used for this purpose and when serializing expressions suffixed
2626
in this way, the serialized field name resolves to the last token
@@ -49,7 +49,7 @@ Expect("raw").WhenSerializing<PropertyName>(expression);
4949
=== Naming conventions
5050

5151
Currently, the name of a field cannot contain a `.` in Elasticsearch due to the potential for ambiguity with
52-
a field that is mapped as a {ref_current}/_multi_fields.html[multi_field].
52+
a field that is mapped as a multi field.
5353

5454
In these cases, NEST allows the call to go to Elasticsearch, deferring the naming conventions to the server side and,
5555
in the case of a `.` in a field name, a `400 Bad Response` is returned with a server error indicating the reason

docs/common-options/time-unit/time-units.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ oneAndHalfYear.Should().BeGreaterThan(twoWeeks);
121121
122122
(oneAndHalfYear >= twoWeeks).Should().BeTrue();
123123
124+
(twoDays != null).Should().BeTrue();
125+
124126
(twoDays >= new Time("2d")).Should().BeTrue();
125127
126128
twoDays.Should().BeLessThan(twoWeeks);

docs/query-dsl/geo/shape/circle/geo-shape-circle-usage.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ q
2626
.Field(p=>p.Location)
2727
.Coordinates(this._coordinates)
2828
.Radius("100m")
29+
.Relation(GeoShapeRelation.Intersects)
2930
)
3031
----
3132

@@ -38,7 +39,8 @@ new GeoShapeCircleQuery
3839
Name = "named_query",
3940
Boost = 1.1,
4041
Field = Field<Project>(p=>p.Location),
41-
Shape = new CircleGeoShape(this._coordinates) { Radius = "100m" }
42+
Shape = new CircleGeoShape(this._coordinates) { Radius = "100m" },
43+
Relation = GeoShapeRelation.Intersects
4244
}
4345
----
4446

docs/query-dsl/geo/shape/envelope/geo-envelope-usage.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ q
2525
.Boost(1.1)
2626
.Field(p=>p.Location)
2727
.Coordinates(this._coordinates)
28+
.Relation(GeoShapeRelation.Intersects)
2829
)
2930
----
3031

@@ -37,7 +38,8 @@ new GeoShapeEnvelopeQuery
3738
Name = "named_query",
3839
Boost = 1.1,
3940
Field = Field<Project>(p=>p.Location),
40-
Shape = new EnvelopeGeoShape(this._coordinates)
41+
Shape = new EnvelopeGeoShape(this._coordinates),
42+
Relation = GeoShapeRelation.Intersects
4143
}
4244
----
4345

docs/query-dsl/geo/shape/indexed-shape/geo-indexed-shape-usage.asciidoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ q
2828
.Id(2)
2929
.Path(pp=>pp.Location)
3030
)
31+
.Relation(GeoShapeRelation.Intersects)
3132
)
3233
----
3334

@@ -45,8 +46,9 @@ new GeoIndexedShapeQuery
4546
Id = 2,
4647
Index = Index<Project>(),
4748
Type = Type<Project>(),
48-
Path = Field<Project>(p=>p.Location)
49-
}
49+
Path = Field<Project>(p=>p.Location),
50+
},
51+
Relation = GeoShapeRelation.Intersects
5052
}
5153
----
5254

@@ -63,7 +65,8 @@ new GeoIndexedShapeQuery
6365
"type": "project",
6466
"index": "project",
6567
"path": "location"
66-
}
68+
},
69+
"relation": "intersects"
6770
}
6871
}
6972
}

0 commit comments

Comments
 (0)