Skip to content

Commit 754bc1d

Browse files
committed
fix spellings
1 parent 3e6b76b commit 754bc1d

26 files changed

+94
-47
lines changed

docs/asciidoc/client-concepts/connection-pooling/building-blocks/date-time-providers.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[[date-time-providers]]
88
== Date time providers
99

10-
Not typically something you'll have to pass to the client but all calls to `System.DateTime.UtcNow`
10+
Not typically something you'll have to pass to the client but all calls to `System.DateTime.UtcNow`
1111
in the client have been abstracted by `IDateTimeProvider`. This allows us to unit test timeouts and cluster failover
1212
without being bound to wall clock time as calculated by using `System.DateTime.UtcNow` directly.
1313

@@ -32,7 +32,7 @@ to provide a custom implementation for.
3232
var dateTimeProvider = DateTimeProvider.Default;
3333
----
3434

35-
The default timeout calculation is: `min(timeout * 2 ^ (attempts * 0.5 -1), maxTimeout)`, where the
35+
The default timeout calculation is: `min(timeout * 2 ^ (attempts * 0.5 -1), maxTimeout)`, where the
3636
default values for `timeout` and `maxTimeout` are
3737

3838
[source,csharp]
@@ -45,7 +45,7 @@ var maxTimeout = TimeSpan.FromMinutes(30);
4545
Plotting these defaults looks as followed:
4646

4747
[[timeout]]
48-
.Default formula, x-axis time in minutes, y-axis number of attempts to revive
48+
.Default formula, x-axis number of attempts to revive, y-axis time in minutes
4949
image::timeoutplot.png[dead timeout]
5050

5151
The goal here is that whenever a node is resurrected and is found to still be offline, we send it_back to the doghouse_ for an ever increasingly long period, until we hit a bounded maximum.

docs/asciidoc/client-concepts/connection-pooling/pinging/first-usage.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ var audit = new Auditor(() => Framework.Cluster
6767
The first call goes to 9200 which succeeds
6868

6969
The 2nd call does a ping on 9201 because its used for the first time.
70-
It fails and so we ping 9202 which also fails. We then ping 9203 becuase
70+
It fails and so we ping 9202 which also fails. We then ping 9203 because
7171
we haven't used it before and it succeeds
7272

7373
Finally we assert that the connectionpool has two nodes that are marked as dead

docs/asciidoc/client-concepts/connection-pooling/round-robin/round-robin.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ round robin over the `live` nodes to evenly distribute request load over all kno
1414

1515
`GetNext` is implemented in a lock free thread safe fashion, meaning each callee gets returned its own cursor to advance
1616
over the internal list of nodes. This to guarantee each request that needs to fall over tries all the nodes without
17-
suffering from noisy neighboors advancing a global cursor.
17+
suffering from noisy neighbours advancing a global cursor.
1818

1919
[source,csharp]
2020
----

docs/asciidoc/client-concepts/connection-pooling/round-robin/skip-dead-nodes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When selecting nodes the connection pool will try and skip all the nodes that ar
1313

1414
GetNext is implemented in a lock free thread safe fashion, meaning each callee gets returned its own cursor to advance
1515
over the internal list of nodes. This to guarantee each request that needs to fall over tries all the nodes without
16-
suffering from noisy neighboors advancing a global cursor.
16+
suffering from noisy neighbours advancing a global cursor.
1717

1818
[source,csharp]
1919
----

docs/asciidoc/client-concepts/connection-pooling/sniffing/on-connection-failure.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Here we seed our connection with 5 known nodes 9200-9204 of which we think
1717
9202, 9203, 9204 are master eligible nodes. Our virtualized cluster will throw once when doing
1818
a search on 9201. This should a sniff to be kicked off.
1919

20-
When the call fails on 9201 the sniff succeeds and returns a new cluster of healty nodes
20+
When the call fails on 9201 the sniff succeeds and returns a new cluster of healthy nodes
2121
this cluster only has 3 nodes and the known masters are 9200 and 9202 but a search on 9201
2222
still fails once
2323

docs/asciidoc/client-concepts/connection-pooling/sniffing/on-stale-cluster-state.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
== Sniffing periodically
99

1010
Connection pools that return true for `SupportsReseeding` can be configured to sniff periodically.
11-
In addition to sniffing on startup and sniffing on failures, sniffing periodically can benefit scenerio's where
11+
In addition to sniffing on startup and sniffing on failures, sniffing periodically can benefit scenarios where
1212
clusters are often scaled horizontally during peak hours. An application might have a healthy view of a subset of the nodes
1313
but without sniffing periodically it will never find the nodes that have been added to help out with load
1414

docs/asciidoc/client-concepts/high-level/inference/document-paths.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
== Document Paths
99

1010
Many API's in Elasticsearch describe a path to a document. In NEST, besides generating a constructor that takes
11-
and Index, Type and Id seperately, we also generate a constructor taking a `DocumentPath` that allows you to describe the path
12-
to your document more succintly
11+
and Index, Type and Id separately, we also generate a constructor taking a `DocumentPath` that allows you to describe the path
12+
to your document more succinctly
1313

1414
=== Creating new instances
1515

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Expect("_mappings,_aliases")
2525

2626
=== Implicit conversion
2727

28-
Here we instantiate a GET index request whichs takes two features, settings and warmers.
28+
Here we instantiate a GET index request which takes two features, settings and warmers.
2929
Notice how we can use the `Feature` enum directly.
3030

3131
[source,csharp]

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ to prevent ambiguity over which property should be used when resolving the path
6464
=== Implicit Conversion
6565

6666
As you can see from the previous examples, using the constructor is rather involved and cumbersome.
67-
Becuase of this, you can also implicitly convert strings and expressions to a `Field`
67+
Because of this, you can also implicitly convert strings and expressions to a `Field`
6868

6969
[source,csharp]
7070
----
@@ -411,7 +411,7 @@ var fieldNameOnA = client.Infer.Field(Field<A>(p => p.C.Name));
411411
var fieldNameOnB = client.Infer.Field(Field<B>(p => p.C.Name));
412412
----
413413

414-
Here we have to similary shaped expressions on coming from A and on from B
414+
Here we have two similarly shaped expressions, one coming from A and one from B
415415
that will resolve to the same field name, as expected
416416

417417
[source,csharp]
@@ -444,7 +444,7 @@ fieldNameOnA.Should().Be("d.name");
444444
fieldNameOnB.Should().Be("c.name");
445445
----
446446

447-
however we didn't break inferrence on the first client instance using its separate connection settings
447+
however we didn't break inference on the first client instance using its separate connection settings
448448

449449
[source,csharp]
450450
----
@@ -466,7 +466,7 @@ To wrap up, the precedence in which field names are inferred is:
466466

467467
. A NEST property mapping
468468

469-
. Ask the serializer if the property has a verbatim value e.g it has an explicit JsonPropery attribute.
469+
. Ask the serializer if the property has a verbatim value e.g it has an explicit JsonProperty attribute.
470470

471471
. Pass the MemberInfo's Name to the DefaultFieldNameInferrer which by default camelCases
472472

docs/asciidoc/client-concepts/high-level/inference/index-name-inference.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NEST has a number of ways in which an index name can be specified
1414

1515
=== Default Index name on ConnectionSettings
1616

17-
A default index name can be specified on `ConnectionSettings` usinf `.DefaultIndex()`.
17+
A default index name can be specified on `ConnectionSettings` using `.DefaultIndex()`.
1818
This is the default index name to use when no other index name can be resolved for a request
1919

2020
[source,csharp]

docs/asciidoc/client-concepts/high-level/inference/indices-paths.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var invalidSingleString = Nest.Indices.Index("name1, name2"); <4>
6161

6262
<2> specifying multiple indices using strings
6363

64-
<3> speciying multiple using types
64+
<3> specifying multiple using types
6565

6666
<4> an **invalid** single index name
6767

docs/asciidoc/client-concepts/high-level/mapping/auto-map.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
247247

248248
In most cases, you'll want to map more than just the vanilla datatypes and also provide
249249
various options for your properties (analyzer to use, whether to enable doc_values, etc...).
250-
In that case, it's possible to use `.AutoMap()` in conjuction with explicitly mapped properties.
250+
In that case, it's possible to use `.AutoMap()` in conjunction with explicitly mapped properties.
251251

252252
Here we are using `.AutoMap()` to automatically map our company type, but then we're
253253
overriding our employee property and making it a `nested` type, since by default,`.AutoMap()` will infer objects as `object`.

docs/asciidoc/code-standards/naming-conventions.asciidoc

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,33 +130,80 @@ requests.Except(responses).Should().BeEmpty();
130130

131131
[source,csharp]
132132
----
133+
var nestAssembly = typeof(IElasticClient).Assembly();
134+
133135
var exceptions = new List<Type>
134136
{
135-
typeof(IElasticClient).Assembly().GetType("Elasticsearch.Net.DotNetCoreTypeExtensions"),
137+
nestAssembly.GetType("Elasticsearch.Net.DotNetCoreTypeExtensions"),
136138
typeof(AggregationWalker),
137139
typeof(AggregationVisitor),
138140
typeof(IAggregationVisitor),
139-
typeof(IElasticClient).Assembly().GetType("System.AssemblyVersionInformation")
141+
nestAssembly.GetType("System.AssemblyVersionInformation"),
142+
#if DOTNETCORE
143+
typeof(SynchronizedCollection<>),
144+
nestAssembly.GetType("System.ComponentModel.Browsable")
145+
#endif
140146
};
141147
142-
var types = typeof(IElasticClient).Assembly().GetTypes();
148+
var types = nestAssembly.GetTypes();
143149
144150
var typesNotInNestNamespace = types
145151
.Where(t => !exceptions.Contains(t))
146152
.Where(t => t.Namespace != "Nest")
153+
.Where(t => !t.Name.StartsWith("<"))
154+
.Where(t => IsValidTypeNameOrIdentifier(t.Name, true))
147155
.ToList();
148156
149157
typesNotInNestNamespace.Should().BeEmpty();
150158
----
151159

152160
[source,csharp]
153161
----
154-
var types = typeof(IElasticLowLevelClient).Assembly().GetTypes();
162+
var elasticsearchNetAssembly = typeof(IElasticLowLevelClient).Assembly();
155163
156-
var typesNotInNestNamespace = types
164+
var exceptions = new List<Type>
165+
{
166+
elasticsearchNetAssembly.GetType("System.AssemblyVersionInformation"),
167+
elasticsearchNetAssembly.GetType("System.FormattableString"),
168+
elasticsearchNetAssembly.GetType("System.Runtime.CompilerServices.FormattableStringFactory"),
169+
elasticsearchNetAssembly.GetType("System.Runtime.CompilerServices.FormattableStringFactory"),
170+
elasticsearchNetAssembly.GetType("Purify.Purifier"),
171+
elasticsearchNetAssembly.GetType("Purify.Purifier+IPurifier"),
172+
elasticsearchNetAssembly.GetType("Purify.Purifier+PurifierDotNet"),
173+
elasticsearchNetAssembly.GetType("Purify.Purifier+PurifierMono"),
174+
elasticsearchNetAssembly.GetType("Purify.Purifier+UriInfo"),
175+
#if DOTNETCORE
176+
elasticsearchNetAssembly.GetType("System.ComponentModel.Browsable")
177+
#endif
178+
};
179+
180+
var types = elasticsearchNetAssembly.GetTypes();
181+
182+
var typesNotIElasticsearchNetNamespace = types
183+
.Where(t => !exceptions.Contains(t))
157184
.Where(t => t.Namespace != "Elasticsearch.Net")
185+
.Where(t => !t.Name.StartsWith("<"))
186+
.Where(t => IsValidTypeNameOrIdentifier(t.Name, true))
158187
.ToList();
159188
160-
typesNotInNestNamespace.Should().BeEmpty();
189+
typesNotIElasticsearchNetNamespace.Should().BeEmpty();
190+
----
191+
192+
[source,csharp]
193+
----
194+
bool nextMustBeStartChar = true;
195+
196+
var character = value[index];
197+
198+
var unicodeCategory = char.GetUnicodeCategory(character);
199+
200+
nextMustBeStartChar = false;
201+
202+
nextMustBeStartChar = false;
203+
----
204+
205+
[source,csharp]
206+
----
207+
nextMustBeStartChar = true;
161208
----
162209

docs/asciidoc/query-dsl/term-level/terms/terms-query-usage.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ new TermsQuery
6060

6161
[[single-term-terms-query]]
6262
[float]
63-
== Single term Terms Query
63+
== Single term Terms Query
6464

6565
=== Fluent DSL Example
6666

src/Tests/ClientConcepts/ConnectionPooling/BuildingBlocks/DateTimeProviders.Doc.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ namespace Tests.ClientConcepts.ConnectionPooling.BuildingBlocks
99
public class DateTimeProviders
1010
{
1111
/**== Date time providers
12-
*
13-
* Not typically something you'll have to pass to the client but all calls to `System.DateTime.UtcNow`
12+
*
13+
* Not typically something you'll have to pass to the client but all calls to `System.DateTime.UtcNow`
1414
* in the client have been abstracted by `IDateTimeProvider`. This allows us to unit test timeouts and cluster failover
1515
* without being bound to wall clock time as calculated by using `System.DateTime.UtcNow` directly.
1616
*/
@@ -29,8 +29,8 @@ [U] public void DefaultNowBehaviour()
2929
[U] public void DeadTimeoutCalculation()
3030
{
3131
var dateTimeProvider = DateTimeProvider.Default;
32-
/**
33-
* The default timeout calculation is: `min(timeout * 2 ^ (attempts * 0.5 -1), maxTimeout)`, where the
32+
/**
33+
* The default timeout calculation is: `min(timeout * 2 ^ (attempts * 0.5 -1), maxTimeout)`, where the
3434
* default values for `timeout` and `maxTimeout` are
3535
*/
3636
var timeout = TimeSpan.FromMinutes(1);
@@ -40,8 +40,8 @@ [U] public void DeadTimeoutCalculation()
4040
* Plotting these defaults looks as followed:
4141
*
4242
*[[timeout]]
43-
*.Default formula, x-axis time in minutes, y-axis number of attempts to revive
44-
*image::timeoutplot.png[dead timeout]
43+
*.Default formula, x-axis number of attempts to revive, y-axis time in minutes
44+
*image::timeoutplot.png[dead timeout]
4545
*
4646
* The goal here is that whenever a node is resurrected and is found to still be offline, we send it
4747
* _back to the doghouse_ for an ever increasingly long period, until we hit a bounded maximum.
@@ -52,7 +52,7 @@ [U] public void DeadTimeoutCalculation()
5252

5353
foreach (var increasedTimeout in timeouts.Take(10))
5454
increasedTimeout.Should().BeWithin(maxTimeout);
55-
55+
5656
}
5757

5858
}

src/Tests/ClientConcepts/ConnectionPooling/Pinging/FirstUsage.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ await audit.TraceCalls(
7777
} }
7878
},
7979
/** The 2nd call does a ping on 9201 because its used for the first time.
80-
* It fails and so we ping 9202 which also fails. We then ping 9203 becuase
80+
* It fails and so we ping 9202 which also fails. We then ping 9203 because
8181
* we haven't used it before and it succeeds */
8282
new ClientCall {
8383
{ PingFailure, 9201},

src/Tests/ClientConcepts/ConnectionPooling/RoundRobin/RoundRobin.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class RoundRobin
1919
/** === GetNext
2020
* `GetNext` is implemented in a lock free thread safe fashion, meaning each callee gets returned its own cursor to advance
2121
* over the internal list of nodes. This to guarantee each request that needs to fall over tries all the nodes without
22-
* suffering from noisy neighboors advancing a global cursor.
22+
* suffering from noisy neighbours advancing a global cursor.
2323
*/
2424
protected int NumberOfNodes = 10;
2525

src/Tests/ClientConcepts/ConnectionPooling/RoundRobin/SkipDeadNodes.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SkippingDeadNodes
1919
* === GetNext
2020
* GetNext is implemented in a lock free thread safe fashion, meaning each callee gets returned its own cursor to advance
2121
* over the internal list of nodes. This to guarantee each request that needs to fall over tries all the nodes without
22-
* suffering from noisy neighboors advancing a global cursor.
22+
* suffering from noisy neighbours advancing a global cursor.
2323
*/
2424
protected int NumberOfNodes = 3;
2525

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/OnConnectionFailure.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ [U] public async Task DoesASniffAfterConnectionFailure()
3131
.ClientCalls(r => r.SucceedAlways())
3232
.ClientCalls(r => r.OnPort(9201).Fails(Once))
3333
/**
34-
* When the call fails on 9201 the sniff succeeds and returns a new cluster of healty nodes
34+
* When the call fails on 9201 the sniff succeeds and returns a new cluster of healthy nodes
3535
* this cluster only has 3 nodes and the known masters are 9200 and 9202 but a search on 9201
3636
* still fails once
3737
*/

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/OnStaleClusterState.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class OnStaleClusterState
1313
/**== Sniffing periodically
1414
*
1515
* Connection pools that return true for `SupportsReseeding` can be configured to sniff periodically.
16-
* In addition to sniffing on startup and sniffing on failures, sniffing periodically can benefit scenerio's where
16+
* In addition to sniffing on startup and sniffing on failures, sniffing periodically can benefit scenarios where
1717
* clusters are often scaled horizontally during peak hours. An application might have a healthy view of a subset of the nodes
1818
* but without sniffing periodically it will never find the nodes that have been added to help out with load
1919
*/

src/Tests/ClientConcepts/HighLevel/Inference/DocumentPaths.doc.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class DocumentPaths
1010
/**== Document Paths
1111
*
1212
* Many API's in Elasticsearch describe a path to a document. In NEST, besides generating a constructor that takes
13-
* and Index, Type and Id seperately, we also generate a constructor taking a `DocumentPath` that allows you to describe the path
14-
* to your document more succintly
13+
* and Index, Type and Id separately, we also generate a constructor taking a `DocumentPath` that allows you to describe the path
14+
* to your document more succinctly
1515
*/
1616

1717
/** === Creating new instances */

src/Tests/ClientConcepts/HighLevel/Inference/FeaturesInference.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ [U] public void Serializes()
2929
public void ImplicitConversion()
3030
{
3131
/** === Implicit conversion
32-
* Here we instantiate a GET index request whichs takes two features, settings and warmers.
32+
* Here we instantiate a GET index request which takes two features, settings and warmers.
3333
* Notice how we can use the `Feature` enum directly.
3434
*/
3535
var request = new GetIndexRequest(All, Feature.Settings | Feature.Warmers);

src/Tests/ClientConcepts/HighLevel/Inference/FieldInference.doc.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void ShouldSetOneProperty()
114114

115115
/**=== Implicit Conversion
116116
* As you can see from the previous examples, using the constructor is rather involved and cumbersome.
117-
* Becuase of this, you can also implicitly convert strings and expressions to a `Field` */
117+
* Because of this, you can also implicitly convert strings and expressions to a `Field` */
118118
[U]
119119
public void ImplicitConversion()
120120
{
@@ -371,7 +371,7 @@ public void ExpressionsAreCachedButSeeDifferentTypes()
371371
var fieldNameOnB = client.Infer.Field(Field<B>(p => p.C.Name));
372372

373373
/**
374-
* Here we have to similary shaped expressions on coming from A and on from B
374+
* Here we have two similarly shaped expressions, one coming from A and one from B
375375
* that will resolve to the same field name, as expected
376376
*/
377377

@@ -396,7 +396,7 @@ public void ExpressionsAreCachedButSeeDifferentTypes()
396396
fieldNameOnA.Should().Be("d.name");
397397
fieldNameOnB.Should().Be("c.name");
398398

399-
/** however we didn't break inferrence on the first client instance using its separate connection settings */
399+
/** however we didn't break inference on the first client instance using its separate connection settings */
400400
fieldNameOnA = client.Infer.Field(Field<A>(p => p.C.Name));
401401
fieldNameOnB = client.Infer.Field(Field<B>(p => p.C.Name));
402402

@@ -410,7 +410,7 @@ public void ExpressionsAreCachedButSeeDifferentTypes()
410410
*
411411
* . A hard rename of the property on connection settings using `.Rename()`
412412
* . A NEST property mapping
413-
* . Ask the serializer if the property has a verbatim value e.g it has an explicit JsonPropery attribute.
413+
* . Ask the serializer if the property has a verbatim value e.g it has an explicit JsonProperty attribute.
414414
* . Pass the MemberInfo's Name to the DefaultFieldNameInferrer which by default camelCases
415415
*
416416
* The following example class will demonstrate this precedence

0 commit comments

Comments
 (0)