diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-index-management.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-index-management.adoc index 77415bc704..683d996fea 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-index-management.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-index-management.adoc @@ -2,7 +2,7 @@ = Index Creation Spring Data MongoDB can automatically create indexes for entity types annotated with `@Document`. -Index creation must be explicitly enabled since version 3.0 to prevent undesired effects with collection lifecyle and performance impact. +Index creation must be explicitly enabled since version 3.0 to prevent undesired effects with collection lifecycle and performance impact. Indexes are automatically created for the initial entity set on application startup and when accessing an entity type for the first time while the application runs. We generally recommend explicit index creation for application-based control of indexes as Spring Data cannot automatically create indexes for collections that were recreated while the application was running. @@ -166,7 +166,7 @@ public class DomainType { Hashed indexes can be created next to other index definitions like shown below, in that case both indices are created: -.Example Hashed Index Usage togehter with simple index +.Example Hashed Index Usage together with simple index ==== [source,java] ---- diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-schema.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-schema.adoc index 6c8e200083..213fc80ef5 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-schema.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping-schema.adoc @@ -89,7 +89,7 @@ template.createCollection(Person.class, CollectionOptions.empty().schema(schema) [[mongo.jsonSchema.generated]] == Generating a Schema -Setting up a schema can be a time consuming task and we encourage everyone who decides to do so, to really take the time it takes. +Setting up a schema can be a time-consuming task, and we encourage everyone who decides to do so, to really take the time it takes. It's important, schema changes can be hard. However, there might be times when one does not want to balked with it, and that is where `JsonSchemaCreator` comes into play. @@ -115,7 +115,7 @@ public class Person { this.age = age; } - // gettter / setter omitted + // getter / setter omitted } MongoJsonSchema schema = MongoJsonSchemaCreator.create(mongoOperations.getConverter()) @@ -146,7 +146,7 @@ template.createCollection(Person.class, CollectionOptions.empty().schema(schema) } } ---- -<1> Simple object properties are consideres regular properties. +<1> Simple object properties are considers regular properties. <2> Primitive types are considered required properties <3> Enums are restricted to possible values. <4> Object type properties are inspected and represented as nested documents. @@ -158,7 +158,7 @@ NOTE: `_id` properties using types that can be converted into `ObjectId` like `S unless there is more specific information available via the `@MongoId` annotation. [cols="2,2,6", options="header"] -.Sepcial Schema Generation rules +.Special Schema Generation rules |=== | Java | Schema Type diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping.adoc index 2056dfa20e..72e5955ac4 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mapping/mapping.adoc @@ -691,7 +691,7 @@ class OrderItem { this.unitPrice = unitPrice; } - // getters/setters ommitted + // getters/setters omitted } Document input = new Document("id", "4711"); diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mapping/property-converters.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mapping/property-converters.adoc index fed1f4c33e..6855acd8e4 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mapping/property-converters.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mapping/property-converters.adoc @@ -78,7 +78,7 @@ This method uses class proxies to determine the property. Make sure that neither the class nor the accessors are `final` as otherwise this approach doesn't work. ==== -WARNING: Dot notation (such as `registerConverter(Person.class, "address.street", …)`) for nagivating across properties into subdocuments is *not* supported when registering converters. +WARNING: Dot notation (such as `registerConverter(Person.class, "address.street", …)`) for navigating across properties into subdocuments is *not* supported when registering converters. TIP: `MongoValueConverter` offers a pre-typed `PropertyValueConverter` interface that uses `MongoConversionContext`. diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc index b1a8248dd5..79134931f9 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc @@ -236,7 +236,7 @@ It is possible to create custom annotations out of the provided ones. MongoDB Collection Info:: + ==== -[source,json,indent=0,subs="verbatim,quotes",role="thrid"] +[source,json,indent=0,subs="verbatim,quotes",role="third"] ---- { name: 'patient', diff --git a/src/main/antora/modules/ROOT/pages/mongodb/mongo-mapreduce.adoc b/src/main/antora/modules/ROOT/pages/mongodb/mongo-mapreduce.adoc index bfccec44fa..10de8a1369 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/mongo-mapreduce.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/mongo-mapreduce.adoc @@ -28,7 +28,7 @@ function () { } ---- -The follwing reduce function sums up the occurrence of each letter across all the documents: +The following reduce function sums up the occurrence of each letter across all the documents: [source,java] ---- @@ -60,7 +60,7 @@ for (ValueObject valueObject : results) { } ---- -The preceding exmaple produces the following output: +The preceding example produces the following output: [source] ---- diff --git a/src/main/antora/modules/ROOT/pages/mongodb/repositories/query-methods.adoc b/src/main/antora/modules/ROOT/pages/mongodb/repositories/query-methods.adoc index 67ccb94e5d..2c2de85b02 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/repositories/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/repositories/query-methods.adoc @@ -833,7 +833,7 @@ and `Document` (eg. new Document("locale", "en_US")) NOTE: In case you enabled the automatic index creation for repository finder methods a potential static collation definition, as shown in (1) and (2), will be included when creating the index. -TIP: The most specifc `Collation` outrules potentially defined others. Which means Method argument over query method annotation over domain type annotation. +TIP: The most specific `Collation` outrules potentially defined others. Which means Method argument over query method annotation over domain type annotation. ==== To streamline usage of collation attributes throughout the codebase it is also possible to use the `@Collation` annotation, which serves as a meta annotation for the ones mentioned above. diff --git a/src/main/antora/modules/ROOT/pages/mongodb/tailable-cursors.adoc b/src/main/antora/modules/ROOT/pages/mongodb/tailable-cursors.adoc index 97433e1416..c0300e5fca 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/tailable-cursors.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/tailable-cursors.adoc @@ -44,7 +44,7 @@ container.register(request, User.class); container.stop(); <7> ---- -<1> Starting the container intializes the resources and starts `Task` instances for already registered `SubscriptionRequest` instances. Requests added after startup are ran immediately. +<1> Starting the container initializes the resources and starts `Task` instances for already registered `SubscriptionRequest` instances. Requests added after startup are ran immediately. <2> Define the listener called when a `Message` is received. The `Message#getBody()` is converted to the requested domain type. Use `Document` to receive raw results without conversion. <3> Set the collection to listen to. <4> Provide an optional filter for documents to receive. diff --git a/src/main/antora/modules/ROOT/pages/mongodb/template-api.adoc b/src/main/antora/modules/ROOT/pages/mongodb/template-api.adoc index ece61559ec..8849393e55 100644 --- a/src/main/antora/modules/ROOT/pages/mongodb/template-api.adoc +++ b/src/main/antora/modules/ROOT/pages/mongodb/template-api.adoc @@ -183,7 +183,7 @@ mongoDbFactory.setExceptionTranslator(myCustomExceptionTranslator); ==== A motivation to customize exception can be MongoDB's behavior during transactions where some failures (such as write conflicts) can become transient and where a retry could lead to a successful operation. -In such a case, you could wrap exceptions with a specific MongoDB label and apply a different exception translation stragegy. +In such a case, you could wrap exceptions with a specific MongoDB label and apply a different exception translation strategy. [[mongo-template.type-mapping]] == Domain Type Mapping